array CUser::SimpleRegister( string email, string site_id = SITE_ID )
The method SimpleRegister creates a new user by generating the random login and password. The method returns an array containing the execution report message which can be passed to ShowMessage.
Note!
This method can only be used in the public section of the site!
Parameter | Description |
---|---|
E-mail of a new user (at least 3 symbols). E-mail is the subject of verification by the function check_email. | |
site_id | ID of the site whose e-mail template is to be used for the notification dispatch (NEW_USER, USER_INFO etc.). Optional. The current site is used by default. |
<? global $USER; $arResult = $USER->SimpleRegister("admin@mysite.com"); ShowMessage($arResult); // display result as a message echo $USER->GetID(); // ID of a new user ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |