Enables the user registration and login system.

File

modules/user/user.module

Functions

Namesort descending Description
user_access Determine whether the user has a given privilege.
user_account_form Helper function to add default user account fields to user registration and edit form.
user_account_form_validate Form validation handler for user_account_form().
user_action_info Implements hook_action_info().
user_admin_menu_output_alter Implements hook_admin_menu_output_alter().
user_admin_paths Implements hook_admin_paths().
user_authenticate Try to validate the user's login credentials locally.
user_autoload_info Implements hook_autoload_info().
user_block_info Implements hook_block_info().
user_block_view Implements hook_block_view().
user_build_content Builds a structured array representing the profile content.
user_build_filter_query Extends a query object for user administration filters based on session.
_user_cancel Last batch processing step for cancelling a user account.
user_cancel Cancel a user account.
user_cancel_access Menu access callback; limit access to account cancellation pages.
_user_cancel_session_regenerate Finished batch processing callback for cancelling a user account.
user_cancel_url Generates a URL to confirm an account cancellation request.
user_comment_view Implements hook_comment_view().
user_config_info Implements hook_config_info().
user_cookie_delete Delete a visitor information cookie.
user_cookie_save Saves visitor information as a cookie so it can be reused.
user_delete Delete a user.
user_delete_multiple Delete multiple user accounts.
user_edit_access Access callback for user account editing.
user_entity_info Implements hook_entity_info().
user_field_extra_fields Implements hook_field_extra_fields().
user_field_info_alter Implements hook_field_info_alter().
user_file_download Implements hook_file_download().
user_file_download_access Implements hook_file_download_access().
user_file_move Implements hook_file_move().
user_file_predelete Implements hook_file_predelete().
user_filters List user administration filters that can be applied.
user_format_name Format a username.
user_form_field_ui_field_edit_form_alter Implements hook_form_FORM_ID_alter().
user_form_field_ui_field_edit_form_submit Additional submit handler for the 'Edit field instance' form.
user_form_process_password Form element process handler for client-side password hide/show and strength.
user_form_process_password_confirm Form element process handler for client-side password validation.
user_has_role Checks if a user has a role.
user_image_style_delete Implements hook_image_style_delete().
user_image_style_save Implements hook_image_style_save().
user_is_anonymous Determines if the current user is anonymous.
user_is_blocked Checks for usernames blocked by user administration.
user_is_logged_in Determines if the current user is logged in.
user_layout_context_info Implements hook_layout_context_info().
user_load Loads a user object.
user_load_by_mail Fetch a user object by email address.
user_load_by_name Fetch a user object by account name.
user_load_multiple Load multiple users based on certain conditions.
user_login Form builder; the main user login form.
user_login_authenticate_validate Second phase validation handler on the login form.
user_login_block
user_login_default_validators Set up a series for validators which check for blocked users, then authenticate against local database, then return an error if authentication fails. Distributed authentication modules are welcome to use hook_form_alter() to change this series in…
user_login_destination Helper function to rewrite the destination to avoid redirecting to login page after login.
user_login_finalize Finalize the login process. Must be called when logging in a user.
user_login_final_validate The final validation handler on the login form.
user_login_name_validate First phase validation handler for the login form.
user_login_submit Submit handler for the login form. Load $user object and perform standard login tasks. The user is then redirected to the My Account page. Setting the destination in the query string overrides the redirect.
user_mail Implements hook_mail().
_user_mail_notify Conditionally create and send a notification email when a certain operation happens on the given user account.
_user_mail_text Returns a mail string for a variable name.
user_mail_tokens Token callback to add unsafe tokens for user mails.
user_menu Implements hook_menu().
user_menu_alter Implements hook_menu_alter().
user_menu_link_alter Implements hook_menu_link_alter().
user_menu_site_status_alter Implements hook_menu_site_status_alter().
user_menu_title Menu item title callback for the 'user' path.
user_module_invoke Invokes a user hook in every module.
user_modules_installed Implements hook_modules_installed().
user_modules_uninstalled Implements hook_modules_uninstalled().
user_node_load Implements hook_node_load().
user_page_title Menu item title callback - use the user name.
user_pass_rehash Creates a unique hash value for use in time-dependent per-user URLs.
user_pass_required_validate Element validate handler for the password field.
user_pass_reset_url Generates a unique URL for a user to login and reset their password.
user_password Generate a random alphanumeric password.
user_password_policy_validate Validation callback for password constraints.
user_permission Implements hook_permission().
user_permission_get_modules Determine the modules that permissions belong to.
user_preferred_language Get the language object preferred by the user. This user preference can be set on the user account editing page, and is only available if there are more than one languages enabled on the site. If the user did not choose a preferred language, or is the…
user_preprocess_block Implements hook_preprocess_block().
user_register_access Determines if the current user has access to the user registration page.
user_register_form Form builder; the user registration form.
user_register_submit Submit handler for the user registration form.
user_register_validate Validation function for the user registration form.
user_role_change_permissions Change permissions for a user role.
user_role_delete Delete a user role from database.
user_role_delete_access Menu access callback for deleting a user.
user_role_grant_permissions Grant permissions to a user role.
user_role_load Load a user role.
user_role_load_by_name Deprecated Legacy wrapper function preserved for backwards-compatibility. This function is no longer used by Backdrop core, since all roles are loaded by name now. See https://api.backdropcms.org/change-records/converted-user-roles-cmi
user_role_permissions Determine the permissions for one or more roles.
user_role_revoke_permissions Revoke permissions from a user role.
user_roles Retrieve an array of roles matching specified conditions.
user_role_save Save a user role to the database.
user_save Save a new or updated user.
user_search_access Implements hook_search_access().
user_search_execute Implements hook_search_execute().
user_search_info Implements hook_search_info().
user_theme Implements hook_theme().
user_translated_menu_link_alter Implements hook_translated_menu_link_alter().
user_uid_optional_load Load either a specified or the current user account.
user_uid_optional_to_arg Returns $arg or the user ID of the current user if $arg is '%' or empty.
user_user_view Implements hook_user_view().
user_validate_current_pass Form validation handler for the current password on the user_account_form().
user_validate_name Verify the syntax of the given name.
user_validate_picture Validates an image uploaded by a user.
user_view Generate an array for rendering the given user.
user_view_access User view access callback.
user_view_page Page callback wrapper for user_view().
user_views_api Implements hook_views_api().

Constants

Namesort descending Description
USER_LOGIN_EMAIL_ONLY Users can login with email address only.
USER_LOGIN_USERNAME_ONLY Users can login with username only.
USER_LOGIN_USERNAME_OR_EMAIL Users can login using either username or email address.
USERNAME_MAX_LENGTH Maximum length of username text field.
USER_PASSWORD_STRENGTH_FAIR
USER_PASSWORD_STRENGTH_GOOD
USER_PASSWORD_STRENGTH_MODIFIER Password strength modifier to encourage longer passwords.
USER_PASSWORD_STRENGTH_STRONG
USER_PASSWORD_STRENGTH_WEAK Password strength levels: weak, fair, good and strong.
USER_REGISTER_ADMINISTRATORS_ONLY Only administrators can create user accounts.
USER_REGISTER_VISITORS Visitors can create their own accounts.
USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL Visitors can create accounts, but they don't become active without administrative approval.