OnAfterUserSimpleRegister
handler function( array &arFields, );The event OnAfterUserSimpleRegister fires after a attempt of user simplified registration via the method CUser::SimpleRegister.
Parameters
Parameter | Description |
---|---|
arFields | Array of new user registration fields:
|
Note All parameters 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.
For example, it allows to change RESULT_MESSAGE, which leads to upd ated message, returned by the function CUser::SimpleRegister.
See Also:
Example of handler function registration:
<? // register the event handler "OnAfterUserSimpleRegister" RegisterModuleDependences("main", "OnAfterUserSimpleRegister", "my_module_id", "MyClass", "OnAfterUserSimpleRegisterHandler"); ?>
Example of handler function:
<? // file /bitrix/modules/my_module_id/include.php class MyClass { // create event handler "OnAfterUserSimpleRegister" public static function OnAfterUserSimpleRegisterHandler(&$fields) { // on successful registration if($fields["USER_ID"]>0) { // set the successful registration message $fields["RESULT_MESSAGE"]["MESSAGE"] = "You have successfully registered at the website. Your login - ".$fields["LOGIN"]; } } } ?>
© «Bitrix24», 2001-2025