Documentation

GetByLogin

CDBResult
CUser::GetByLogin(
 string login
)

The method returns a user by the login as the CDBResult class object. Static method.

Parameters

ParameterDescription
login User login.

See Also

Examples of use

<?
$rsUser = CUser::GetByLogin("admin");
$arUser = $rsUser->Fetch();
echo "<pre>"; print_r($arUser); echo "</pre>";
?>
$UserLogin = "user";
$rsUser = CUser::GetByLogin($UserLogin);
if($arUser = $rsUser->Fetch())
{
      echo "
"; print_r(); echo "
"; } else { echo 'User with "'.$UserLogin.'" login not found!'; }


© «Bitrix24», 2001-2022
Up