本文整理汇总了PHP中UserRepository::LoadByPublicId方法的典型用法代码示例。如果您正苦于以下问题:PHP UserRepository::LoadByPublicId方法的具体用法?PHP UserRepository::LoadByPublicId怎么用?PHP UserRepository::LoadByPublicId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserRepository
的用法示例。
在下文中一共展示了UserRepository::LoadByPublicId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Registered
private function Registered()
{
$mySession = ServiceLocator::GetServer()->GetUserSession();
$userrepo = new UserRepository();
$user = $userrepo->LoadByPublicId($mySession->PublicId);
$credi = $user->GetAttributeValue(19);
return $credi;
}
示例2: testLoadsUserByPublicId
public function testLoadsUserByPublicId()
{
$userRow = $this->GetUserRow();
$emailPrefRows = $this->GetEmailPrefRows();
$permissionsRows = $this->GetPermissionsRows();
$groupsRows = $this->GetGroupsRows();
$attributeRows = $this->GetAttributeRows();
$ownedGroupRows = $this->GetOwnedGroupRows();
$preferenceRows = $this->GetPreferenceRows();
$this->db->SetRow(0, array($userRow));
$this->db->SetRow(1, $emailPrefRows);
$this->db->SetRow(2, $permissionsRows);
$this->db->SetRow(3, $groupsRows);
$this->db->SetRow(4, $attributeRows);
$this->db->SetRow(5, $ownedGroupRows);
$this->db->SetRow(6, $preferenceRows);
$publicId = uniqid();
$userRepository = new UserRepository();
$user = $userRepository->LoadByPublicId($publicId);
$loadByIdCommand = new GetUserByPublicIdCommand($publicId);
$this->assertEquals(7, count($this->db->_Commands));
$this->assertTrue($this->db->ContainsCommand($loadByIdCommand));
$this->assertNotNull($user);
}