user.module

Enables the user registration and login system.

File

drupal/core/modules/user/user.module
View source

Functions

Namesort descending Description
template_preprocess_username Preprocesses variables for theme_username().
template_process_username Processes variables for theme_username().
theme_username Returns HTML for a username, potentially linked to the user's page.
theme_user_signature Returns HTML for a user signature.
user_access Determine whether the user has a given privilege.
user_action_info Implements hook_action_info().
user_admin_paths Implements hook_admin_paths().
user_attach_accounts Populates $entity->account for each prepared entity.
user_authenticate Try to validate the user's login credentials locally.
user_block_configure Implements hook_block_configure().
user_block_info Implements hook_block_info().
user_block_save Implements hook_block_save().
user_block_user_action Blocks the current user.
user_block_view Implements hook_block_view().
user_build_filter_query Extends a query object for user administration filters based on session.
user_cancel Cancel a user account.
user_cancel_access Menu access callback; limit access to account cancellation pages.
user_cancel_url Generates a URL to confirm an account cancellation request.
user_comment_view Implements hook_comment_view().
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_external_load Fetches a user object based on an external authentication source.
user_external_login_register Helper function for authentication modules. Either logs in or registers the current user, based on username. Either way, the global $user object is populated and login tasks are performed.
user_field_extra_fields Implements hook_field_extra_fields().
user_field_info_alter Implements hook_field_info_alter().
user_file_download_access Implements hook_file_download_access().
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_confirm Form element process handler for client-side password validation.
user_get_authmaps Discover which external authentication module(s) authenticated a username.
user_help Implement hook_help().
user_is_anonymous
user_is_blocked Checks for usernames blocked by user administration.
user_is_logged_in
user_label Entity label callback.
user_library_info Implements hook_library_info().
user_load Loads a user object.
user_load_by_mail Fetches a user object by email address.
user_load_by_name Fetches a user object by account name.
user_load_multiple Loads multiple users based on certain conditions.
user_login_authenticate_validate A validate handler on the login form. Check supplied username/password against local users table. If successful, $form_state['uid'] is set to the matching user ID.
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_form Form builder; the main user login form.
user_login_form_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_login_name_validate A FAPI validate handler. Sets an error if supplied username has been blocked.
user_mail Implements hook_mail().
user_mail_tokens Token callback to add unsafe tokens for user mails.
user_menu Implements hook_menu().
user_menu_breadcrumb_alter Implements hook_menu_breadcrumb_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_modules_installed Implements hook_modules_installed().
user_modules_uninstalled Implements hook_modules_uninstalled().
user_multiple_cancel_confirm
user_multiple_cancel_confirm_submit Submit handler for mass-account cancellation form.
user_multiple_role_edit Callback function for admin mass adding/deleting a user role.
user_node_load Implements hook_node_load().
user_page_title Menu item title callback - use the user name.
user_password Generate a random alphanumeric password.
user_pass_rehash Creates a unique hash value for use in time-dependent per-user URLs.
user_pass_reset_url Generates a unique URL for a user to login and reset their password.
user_permission Implements hook_permission().
user_permission_get_modules Determine the modules that permissions belong to.
user_picture_enabled Returns whether this site supports the default user picture feature.
user_preferred_langcode 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_HOOK() for block.tpl.php.
user_rdf_mapping Implements hook_rdf_mapping().
user_register_access
user_roles Retrieve an array of roles matching specified conditions.
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 user role deletion.
user_role_grant_permissions Grant permissions to a user role.
user_role_load Fetches a user role by role ID.
user_role_permissions Determine the permissions for one or more roles.
user_role_revoke_permissions Revoke permissions from a user role.
user_role_save Save a user role to the database.
user_search_access Implements hook_search_access().
user_search_execute Implements hook_search_execute().
user_search_info Implements hook_search_info().
user_set_authmaps Save mappings of which external authentication module(s) authenticated a user. Maps external usernames to user ids in the users table.
user_template_preprocess_default_variables_alter Implements hook_template_preprocess_default_variables_alter().
user_theme Implements hook_theme().
user_toolbar Implements hook_toolbar().
user_translated_menu_link_alter Implements hook_translated_menu_link_alter().
user_uid_only_optional_to_arg Returns $arg or the user ID of the current user if $arg is '%' or empty.
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_uri Entity URI callback.
user_user_login Implements hook_user_login().
user_user_logout Implements hook_user_logout().
user_user_operations Implements hook_user_operations().
user_user_operations_block Callback function for admin mass blocking users.
user_user_operations_unblock Callback function for admin mass unblocking users.
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_view Generate an array for rendering the given user.
user_view_access User view access callback.
user_view_multiple Constructs a drupal_render() style array from an array of loaded users.
user_view_page Page callback wrapper for user_view().
_user_cancel Last batch processing step for cancelling a user account.
_user_language_selector_langcode_value Sets the value of the user register and profile forms' langcode element.
_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.

Constants

Namesort descending Description
EMAIL_MAX_LENGTH Maximum length of user e-mail text field.
USERNAME_MAX_LENGTH Maximum length of username text field.
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.