Bitrix Site Manager

CUser::SendPassword

array
CUser::SendPassword(
 string login,
 string email,
 string site_id = SITE_ID
)

The method SendPassword sends a message with the control string used for password change. The message is sent using the template USER_INFO. The user can be identified by either login or e-mail address.

The method returns an array containing the execution report message which can be passed to ShowMessage.

Parameters

ParameterDescription
login User login.
email User e-mail address.
site_id The site ID whose e-mail template USER_INFO is to be used.
Optional. The current site is used by default.

See Also

Example



<?
global $USER;
$arResult = $USER->SendPassword($USER->GetLogin(),
                                $USER->GetParam("EMAIL"));
if ($arResult["TYPE"] == "OK")
    echo "Control string for the password change has been sent.";
else 
    echo "The login (or e-mail) cannot be found.";
?>