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_multiple

user_load_multiple(array $uids = NULL, $reset = FALSE) Loads multiple users based on certain conditions. This function should be used whenever you need to load more than one user from the database. Users are loaded into memory and will not require database access if loaded again during the same page request. Parameters array $uids: (optional) An array of entity IDs. If omitted, all entities are loaded. bool $reset: A boolean indicating that the internal cache should be reset. Use this if loadi

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_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_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_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_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_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_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_cookie_delete

user_cookie_delete($cookie_name) Delete a visitor information cookie. Parameters string $cookie_name: A cookie name such as 'homepage'. File core/modules/user/user.module, line 1300 Enables the user registration and login system. Code function user_cookie_delete($cookie_name) { setrawcookie('Drupal.visitor.' . $cookie_name, '', REQUEST_TIME - 3600, '/'); }