GetPasswordHash
string CUser::GetPasswordHash( string PASSWORD_HASH )
The method returns a hash string on the user password that can be used with functions LoginByHash and SavePasswordHash. Non-static method.
Parameters
Parameter | Description |
---|---|
PASSWORD_HASH | Hash (MD5) on the real password of a user. You can obtain the MD5 hash on the current user password by calling the |
See Also
Examples of use
<? function SetCurrentUserAuthCookie() { global $USER; $hash = CUser::GetPasswordHash($USER->GetParam("PASSWORD_HASH")); $name = COption::GetOptionString("main", "cookie_name", "BITRIX_SM")."_UIDH"; @setcookie($name, $hash, time()+60*60*24*30*60, "/"); } ?>
© «Bitrix24», 2001-2024