user_load_by_name

user_load_by_name($name) Fetches a user object by account name. Parameters string $name: String with the account's user name. 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 251 Enables the user registration and login system. Code function user_load_by_name($name) { $users = \Drupal::entityTypeManager()->getStorage('user') -&g

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

user_delete_multiple(array $uids) Delete multiple user accounts. Parameters int[] $uids: An array of user IDs. See also hook_ENTITY_TYPE_predelete() hook_ENTITY_TYPE_delete() File core/modules/user/user.module, line 857 Enables the user registration and login system. Code function user_delete_multiple(array $uids) { entity_delete_multiple('user', $uids); }