event_handler( array &arFields, );
The OnAfterUserSimpleRegister event fires after a attempt of user simplified registration performed by CUser::SimpleRegister.
Parameter | Description |
---|---|
arFields | Array of 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, this allows to modify the RESULT_MESSAGE, which will change message returned by the method CUser::Login.
<? // register handler OnAfterUserSimpleRegister RegisterModuleDependences("main", "OnAfterUserSimpleRegister", "my_module_id", "MyClass", "OnAfterUserSimpleRegisterHandler"); ?>
<? // file /bitrix/modules/my_module_id/include.php class MyClass { // create handler "OnAfterUserSimpleRegister" function OnAfterUserSimpleRegisterHandler(&$fields) { // if the registration succeeds... if($fields["USER_ID"]>0) { // set the registration confirmation message $fields["RESULT_MESSAGE"]["MESSAGE"] = "Registration successful." "Your login: ".$fields["LOGIN"]; } } } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |