Bitrix Site Manager

OnSendUserInfo event

  array &arParams

The OnSendUserInfo event handler is called from the method CUser::SendUserInfo. Handler function can redefine parameters of sending an e-mail message USER_INFO.


arParams Array of fields for checking login and password:
  • FIELDS - array containing fields in the format Array("field 1"=>"value 1", ...). All these fields are passed to the template USER_INFO. By default, contains the following fields:
    • "USER_ID" - user ID;
    • "STATUS" - active state text;
    • "MESSAGE" - message body text;
    • "LOGIN" - login;
    • "CHECKWORD" - check word;
    • "NAME" - user first name;
    • "LAST_NAME" - user last name;
    • "EMAIL" - e-mail address.
  • USER_FIELDS - fields of user whose information is to be sent;
  • SITE_ID - ID of the site. Used to determine the USER_INFO template.

All parameters passed to this handler function and the arParams array are references to original variables. Therefore, all changes to parameters made within the handler affect values of the original variables.

See Also


// file /bitrix/php_interface/init.php

function MyOnSendUserInfoHandler(&$arParams)
    if (strlen($arParams['USER_FIELDS']['LAST_NAME']) <= 0)
        $arParams['CUSTOM_NAME'] = 
        $arParams['CUSTOM_NAME'] = 
    // now macro #CUSTOM_NAME# can be used 
    // with template USER_INFO