Documentation

GetParam

mixed
CUser::GetParam(
 string param_name
)

The method returns one of the user parameters stored in the authorization session (usually called fr om the $USER object). Non-static method.

Parameters

ParameterDescription
param_name Parameter name. The following values are possible:
  • AUTHORIZED - returns "Y" if the user is authorized;
  • USER_ID - user ID;
  • LOGIN - login;
  • EMAIL - e-mail;
  • NAME - full name;
  • GROUPS - array of groups to which the user belongs;
  • ADMIN - returns true if the user is in the Administrators group;
  • PASSWORD_HASH - user password hash (md5);
    $salt . md5($salt . $pass)
    wh ere $salt - 8 arbitrary symbols which are changed every time the password is modified.
  • FIRST_NAME - user first name;
  • LAST_NAME - user last name;
  • SECOND_NAME - user middle name.

See Also

Examples of use

<?
global $USER;
echo "E-Mail: ".$USER->GetParam("EMAIL");
?>


© «Bitrix24», 2001-2022
Up