auth::create_user (public)
auth::create_user [ -verify_password_confirm ] [ -user_id user_id ] \ [ -username username ] -email email [ -first_names first_names ] \ [ -last_name last_name ] [ -screen_name screen_name ] \ [ -password password ] [ -password_confirm password_confirm ] \ [ -url url ] [ -secret_question secret_question ] \ [ -secret_answer secret_answer ] \ [ -email_verified_p email_verified_p ] [ -nologin ] \ [ -authority_id authority_id ]
Defined in packages/acs-authentication/tcl/authentication-procs.tcl
Create a user, and return creation status and account status.
- Switches:
- -verify_password_confirm (optional, boolean)
- Set this flag if you want the proc to verify that password and password_confirm match for you.
- -user_id (optional)
- -username (optional)
- -email (required)
- -first_names (optional)
- -last_name (optional)
- -screen_name (optional)
- -password (optional)
- -password_confirm (optional)
- -url (optional)
- -secret_question (optional)
- -secret_answer (optional)
- -email_verified_p (optional)
- Whether the local account considers the email to be verified or not.
- -nologin (optional, boolean)
- -authority_id (optional)
- create user in the specified authority. Defaults to the register authority of the subsite.
- Returns:
- Array list containing the following entries:
- creation_status: ok, data_error, reg_error, failed_to_connect. Says whether user creation succeeded.
- creation_message: Information about the problem, to be relayed to the user. If creation_status is not ok, then either creation_message or element_messages is guaranteed to be nonempty, and both are guaranteed to be in the array list. May contain HTML.
- element_messages: list of (element_name, message, element_name, message, ...) of errors on the individual registration elements. to be relayed on to the user. If creation_status is not ok, then either creation_message or element_messages is guaranteed to be nonempty, and both are guaranteed to be in the array list. Cannot contain HTML.
- account_status: ok, closed. Only set if creation_status was ok, this says whether the newly created account is ready for use or not. For example, we may require approval, in which case the account would be created but closed.
- account_message: A human-readable explanation of why the account was closed. May include HTML, and thus shouldn't be quoted. Guaranteed to be nonempty if account_status is not ok.
- user_id: The user_id of the created user. Only when creation_status is ok.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_authenticate, auth_create_user, auth_password_change, auth_password_reset, auth_use_email_for_login_p, auth_email_on_password_change, person_procs_test, party_procs_test