user.module

Enables the user registration and login system.

File

modules/user/user.module

Functions

Name Description
template_preprocess_user_picture Process variables for user-picture.tpl.php.
theme_user_list Returns HTML for a list of users.
theme_user_signature Returns HTML for a user signature.
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_paths Implements hook_admin_paths().
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 a specific user or the current user, if one is not specified.
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 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_category_load Return a user object after checking if any profile category in the path exists.
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_element_info Implements hook_element_info().
user_entity_info Implements hook_entity_info().
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_delete Implements hook_file_delete().
user_file_download Implements hook_file_download().
user_file_download_access Implements hook_file_download_access().
user_file_move Implements hook_file_move().
user_filters List user administration filters that can be applied.
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_has_role Checks if a user has a role.
user_help Implements hook_help().
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_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 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_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 A FAPI validate handler. Sets an error if supplied username has been blocked.
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_tokens Token callback to add unsafe tokens for user mails.
user_menu Implements hook_menu().
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_module_invoke Invokes a user hook in every module.
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_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_rdf_mapping Implements hook_rdf_mapping().
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_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_edit_access Menu access callback for user role editing.
user_role_grant_permissions Grant permissions to a user role.
user_role_load Fetches a user role by role ID.
user_role_load_by_name Fetches a user role by role name.
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_save Save changes to a user account or add a new user.
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_system_info_alter Implements hook_system_info_alter().
user_theme Implements hook_theme().
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 Implements callback_entity_info_uri().
user_user_categories Implements hook_user_categories().
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_presave Implements hook_user_presave().
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_mail Validates a user's email address.
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_cancel Implements callback_batch_operation().
_user_cancel_session_regenerate Implements callback_batch_finished().
_user_categories Retrieve a list of all user setting/information categories and sort them by weight.
_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_sort

Constants

Name 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.

Classes

Name Description
UserController Controller class for users.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/7.x