本文整理汇总了PHP中PFUser::setLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP PFUser::setLanguage方法的具体用法?PHP PFUser::setLanguage怎么用?PHP PFUser::setLanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PFUser
的用法示例。
在下文中一共展示了PFUser::setLanguage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}