当前位置: 首页>>代码示例>>PHP>>正文


PHP PFUser::setPassword方法代码示例

本文整理汇总了PHP中PFUser::setPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP PFUser::setPassword方法的具体用法?PHP PFUser::setPassword怎么用?PHP PFUser::setPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PFUser的用法示例。


在下文中一共展示了PFUser::setPassword方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generateUsers

 public function generateUsers()
 {
     $user_1 = new PFUser();
     $user_1->setUserName(self::TEST_USER_1_NAME);
     $user_1->setRealName(self::TEST_USER_1_REALNAME);
     $user_1->setLdapId(self::TEST_USER_1_LDAPID);
     $user_1->setPassword(self::TEST_USER_1_PASS);
     $user_1->setStatus(self::TEST_USER_1_STATUS);
     $user_1->setEmail(self::TEST_USER_1_EMAIL);
     $user_1->setLanguage($GLOBALS['Language']);
     $this->user_manager->createAccount($user_1);
     $user_1->setLabFeatures(true);
     return $this;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:TestDataBuilder.php

示例2: generateUsers

 public function generateUsers()
 {
     echo "Create users\n";
     $user = new PFUser();
     $user->setUserName(self::USER_RICHARD_NAME);
     $user->setPassword(self::USER_RICHARD_PASS);
     $user->setEmail(self::USER_RICHARD_NAME . '@localhost.localdomain');
     $user->setRealName("Richard Cover");
     $user->setLanguage($GLOBALS['Language']);
     $this->richard = UserManager::instance()->createAccount($user);
     $user = new PFUser();
     $user->setUserName(self::USER_ALICE_NAME);
     $user->setPassword(self::USER_ALICE_PASS);
     $user->setEmail(self::USER_ALICE_NAME . '@localhost.localdomain');
     $user->setRealName("Alice Tyrell");
     $user->setLanguage($GLOBALS['Language']);
     $this->alice = UserManager::instance()->createAccount($user);
     return $this;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:19,代码来源:GuineaPig.php

示例3: generateUsers

 public function generateUsers()
 {
     $user_1 = new PFUser();
     $user_1->setUserName(self::TEST_USER_1_NAME);
     $user_1->setRealName(self::TEST_USER_1_REALNAME);
     $user_1->setLdapId(self::TEST_USER_1_LDAPID);
     $user_1->setPassword(self::TEST_USER_1_PASS);
     $user_1->setStatus(self::TEST_USER_1_STATUS);
     $user_1->setEmail(self::TEST_USER_1_EMAIL);
     $user_1->setLanguage($GLOBALS['Language']);
     $this->user_manager->createAccount($user_1);
     $user_1->setLabFeatures(true);
     $user_2 = new PFUser();
     $user_2->setUserName(self::TEST_USER_2_NAME);
     $user_2->setPassword(self::TEST_USER_2_PASS);
     $user_2->setStatus(self::TEST_USER_2_STATUS);
     $user_2->setEmail(self::TEST_USER_2_EMAIL);
     $user_2->setLanguage($GLOBALS['Language']);
     $user_2->setAuthorizedKeys('ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHk9 toto@marche');
     $this->user_manager->createAccount($user_2);
     $user_3 = new PFUser();
     $user_3->setUserName(self::TEST_USER_3_NAME);
     $user_3->setPassword(self::TEST_USER_3_PASS);
     $user_3->setStatus(self::TEST_USER_3_STATUS);
     $user_3->setEmail(self::TEST_USER_3_EMAIL);
     $user_3->setLanguage($GLOBALS['Language']);
     $this->user_manager->createAccount($user_3);
     $user_4 = new PFUser();
     $user_4->setUserName(self::TEST_USER_4_NAME);
     $user_4->setPassword(self::TEST_USER_4_PASS);
     $user_4->setStatus(self::TEST_USER_4_STATUS);
     $user_4->setEmail(self::TEST_USER_1_EMAIL);
     $user_4->setLanguage($GLOBALS['Language']);
     $this->user_manager->createAccount($user_4);
     return $this;
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:36,代码来源:TestDataBuilder.php

示例4: synchronizeUser

 /**
  * Synchronize user account with LDAP informations
  *
  * @param  PFUser       $user
  * @param  LDAPResult $lr
  * @param  String     $password
  * @return Boolean
  */
 function synchronizeUser(PFUser $user, LDAPResult $lr, $password)
 {
     $user->setPassword($password);
     $sync = LDAP_UserSync::instance();
     $sync->sync($user, $lr);
     // Perform DB update
     $userUpdated = $this->getUserManager()->updateDb($user);
     $ldapUpdated = true;
     $user_id = $this->getLdapLoginFromUserIds(array($user->getId()))->getRow();
     if ($user_id['ldap_uid'] != $lr->getLogin()) {
         $ldapUpdated = $this->updateLdapUid($user, $lr->getLogin());
         $this->triggerRenameOfUsers();
     }
     return $userUpdated || $ldapUpdated;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:23,代码来源:LDAP_UserManager.class.php

示例5: createUserForMirror

 private function createUserForMirror($mirror_id, $password, $ssh_key)
 {
     $user = new PFUser(array('user_name' => self::MIRROR_OWNER_PREFIX . $mirror_id, 'status' => 'A', 'unix_status' => 'A'));
     $user->setPassword($password);
     $this->user_manager->createAccount($user);
     $this->user_manager->addSSHKeys($user, $ssh_key);
     return $user;
 }
开发者ID:LouisRenWeiWei,项目名称:tuleap,代码行数:8,代码来源:MirrorDataMapper.class.php

示例6: account_create

function account_create($loginname = '', $pw = '', $ldap_id = '', $realname = '', $register_purpose = '', $email = '', $status = 'P', $confirm_hash = '', $mail_site = 0, $mail_va = 0, $timezone = 'GMT', $lang_id = 'en_US', $unix_status = 'N', $expiry_date = 0)
{
    $um = UserManager::instance();
    $user = new PFUser();
    $user->setUserName($loginname);
    $user->setRealName($realname);
    $user->setPassword($pw);
    $user->setLdapId($ldap_id);
    $user->setRegisterPurpose($register_purpose);
    $user->setEmail($email);
    $user->setStatus($status);
    $user->setConfirmHash($confirm_hash);
    $user->setMailSiteUpdates($mail_site);
    $user->setMailVA($mail_va);
    $user->setTimezone($timezone);
    $user->setLanguageID($lang_id);
    $user->setUnixStatus($unix_status);
    $user->setExpiryDate($expiry_date);
    $u = $um->createAccount($user);
    if ($u) {
        return $u->getId();
    } else {
        return $u;
    }
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:account.php


注:本文中的PFUser::setPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。