本文整理匯總了PHP中eZUser::passwordHashTypeID方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZUser::passwordHashTypeID方法的具體用法?PHP eZUser::passwordHashTypeID怎麽用?PHP eZUser::passwordHashTypeID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZUser
的用法示例。
在下文中一共展示了eZUser::passwordHashTypeID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createNeweZUser
private function createNeweZUser()
{
$user = eZUser::create( $this->userObject->attribute( 'id' ) );
$user->setAttribute( 'login', $this->userLogin );
$user->setAttribute( 'email', $this->userEmail );
$user->setAttribute( 'password_hash', self::USER_PASSWORD_HASH );
$user->setAttribute( 'password_hash_type', eZUser::passwordHashTypeID( self::USER_PASSWORD_HASH_ID ) );
$user->store();
if( !$user instanceof eZUser )
{
die( 'FAIL : not an eZUser' );
}
}
示例2: unserializeContentObjectAttribute
function unserializeContentObjectAttribute($package, $objectAttribute, $attributeNode)
{
$userNode = $attributeNode->getElementsByTagName('account')->item(0);
if (is_object($userNode)) {
$userID = $objectAttribute->attribute('contentobject_id');
$user = eZUser::fetch($userID);
if (!is_object($user)) {
$user = eZUser::create($userID);
}
$user->setAttribute('login', $userNode->getAttribute('login'));
$user->setAttribute('email', $userNode->getAttribute('email'));
$user->setAttribute('password_hash', $userNode->getAttribute('password_hash'));
$user->setAttribute('password_hash_type', eZUser::passwordHashTypeID($userNode->getAttribute('password_hash_type')));
$user->store();
}
}