OnSendUserInfo
handler function( array &arParams );The event OnSendUserInfo fires in the method CUser::SendUserInfo and is designed to re-define parameters for sending mail event USER_INFO.
Parameters
Parameter | Description |
---|---|
arParams | Array of fields to check login name and password:
|
Note Parameter and array elements arParams passed to this handler function are references to original variables. Therefore, all changes to parameters made within the handler affect values of the original variables.
See Also
Example of handler function:
<?
// file /bitrix/php_interface/init.php
AddEventHandler("main", "OnSendUserInfo", "MyOnSendUserInfoHandler");
public static function MyOnSendUserInfoHandler(&$arParams)
{
if(strlen($arParams['USER_FIELDS']['LAST_NAME'])<=0)
$arParams['FIELDS']['CUSTOM_NAME'] = $arParams['USER_FIELDS']['LAST_NAME'];
else
$arParams['FIELDS']['CUSTOM_NAME'] = $arParams['USER_FIELDS']['LOGIN'];
// now USER_INFO template can use the macro #CUSTOM_NAME#
}
? >
© «Bitrix24», 2001-2024