user_load_by_mail

user_load_by_mail($mail) Fetches a user object by email address. Parameters string $mail: String with the account's email address. Return value object|bool A fully-loaded $user object upon successful user load or FALSE if user cannot be loaded. See also \Drupal\user\Entity\User::loadMultiple() File core/modules/user/user.module, line 234 Enables the user registration and login system. Code function user_load_by_mail($mail) { $users = \Drupal::entityTypeManager()->getStorage('user')

user_load

user_load($uid, $reset = FALSE) Loads a user object. Parameters int $uid: Integer specifying the user ID to load. bool $reset: TRUE to reset the internal cache and load from the database; FALSE (default) to load from the internal cache, if set. Return value \Drupal\user\UserInterface A fully-loaded user object upon successful user load, or NULL if the user cannot be loaded. Deprecated in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\user\Entity\User::load(). See also \Drupal\

user_js_settings_alter

user_js_settings_alter(&$settings, AttachedAssetsInterface $assets) Implements hook_js_settings_alter(). File core/modules/user/user.module, line 111 Enables the user registration and login system. Code function user_js_settings_alter(&$settings, AttachedAssetsInterface $assets) { // Provide the user ID in drupalSettings to allow JavaScript code to customize // the experience for the end user, rather than the server side, which would // break the render cache. // Similarly, pr

user_is_blocked

user_is_blocked($name) Checks for usernames blocked by user administration. Parameters string $name: A string containing a name of the user. Return value bool TRUE if the user is blocked, FALSE otherwise. File core/modules/user/user.module, line 362 Enables the user registration and login system. Code function user_is_blocked($name) { return (bool) \Drupal::entityQuery('user') ->condition('name', $name) ->condition('status', 0) ->execute(); }

user_install

user_install() Implements hook_install(). File core/modules/user/user.install, line 66 Install, update and uninstall functions for the user module. Code function user_install() { $storage = \Drupal::entityManager()->getStorage('user'); // Insert a row for the anonymous user. $storage ->create(array( 'uid' => 0, 'status' => 0, 'name' => '', )) ->save(); // We need some placeholders here as name and mail are unique. // This will be changed by the

user_help

user_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/user/user.module, line 53 Enables the user registration and login system. Code function user_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.user': $output = ''; $output .= '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The User module allows users to register, log in, and log out. It also allows users w

user_form_process_password_confirm

user_form_process_password_confirm($element) Form element process handler for client-side password validation. This #process handler is automatically invoked for 'password_confirm' form elements to add the JavaScript and string translations for dynamic password validation. File core/modules/user/user.module, line 1240 Enables the user registration and login system. Code function user_form_process_password_confirm($element) { $password_settings = array( 'confirmTitle' => t('Passwords

user_format_name

user_format_name(AccountInterface $account) Format a username. @todo Remove usage in https://www.drupal.org/node/2311219. Parameters \Drupal\Core\Session\AccountInterface $account: The account object for the user whose name is to be formatted. Return value string An unsanitized string with the username to display. Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\Session\AccountInterface::getDisplayName(). File core/modules/user/user.module, line 425 Ena

user_entity_extra_field_info

user_entity_extra_field_info() Implements hook_entity_extra_field_info(). File core/modules/user/user.module, line 138 Enables the user registration and login system. Code function user_entity_extra_field_info() { $fields['user']['user']['form']['account'] = array( 'label' => t('User name and password'), 'description' => t('User module account form elements.'), 'weight' => -10, ); $fields['user']['user']['form']['language'] = array( 'label' => t('Language set

user_element_info_alter

user_element_info_alter(array &$types) Implements hook_element_info_alter(). File core/modules/user/user.module, line 1227 Enables the user registration and login system. Code function user_element_info_alter(array &$types) { if (isset($types['password_confirm'])) { $types['password_confirm']['#process'][] = 'user_form_process_password_confirm'; } }