user_role_permissions

user_role_permissions(array $roles) Determine the permissions for one or more roles. Parameters array $roles: An array of role IDs. Return value array An array indexed by role ID. Each value is an array of permission strings for the given role. File core/modules/user/user.module, line 319 Enables the user registration and login system. Code function user_role_permissions(array $roles) { if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') { return _user_role_permis

USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL

Visitors can create accounts, but they don't become active without administrative approval. File core/modules/user/user.module, line 48 Enables the user registration and login system. Code const USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL = 'visitors_admin_approval';

user_roles

user_roles($membersonly = FALSE, $permission = NULL) Retrieve an array of roles matching specified conditions. Parameters bool $membersonly: (optional) Set this to TRUE to exclude the 'anonymous' role. Defaults to FALSE. string|null $permission: (optional) A string containing a permission. If set, only roles containing that permission are returned. Defaults to NULL, which returns all roles. Return value \Drupal\user\RoleInterface[] An associative array with the role id as the key and the role

user_role_load

user_role_load($rid) Fetches a user role by role ID. Parameters string $rid: A string representing the role ID. Return value \Drupal\user\RoleInterface|null A fully-loaded role object if a role with the given ID exists, or NULL otherwise. Deprecated in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\user\Entity\Role::load(). File core/modules/user/user.module, line 1081 Enables the user registration and login system. Code function user_role_load($rid) { return Role::load($ri

user_role_change_permissions

user_role_change_permissions($rid, array $permissions = array()) Change permissions for a user role. This function may be used to grant and revoke multiple permissions at once. For example, when a form exposes checkboxes to configure permissions for a role, the form submit handler may directly pass the submitted values for the checkboxes form element to this function. Parameters mixed $rid: The ID of a user role to alter. array $permissions: (optional) An associative array, where the key holds

user_role_grant_permissions

user_role_grant_permissions($rid, array $permissions = array()) Grant permissions to a user role. Parameters mixed $rid: The ID of a user role to alter. array $permissions: (optional) A list of permission names to grant. See also user_role_change_permissions() user_role_revoke_permissions() File core/modules/user/user.module, line 1139 Enables the user registration and login system. Code function user_role_grant_permissions($rid, array $permissions = array()) { // Grant new permissions fo

user_pass_rehash

user_pass_rehash(UserInterface $account, $timestamp) Creates a unique hash value for use in time-dependent per-user URLs. This hash is normally used to build a unique and secure URL that is sent to the user by email for purposes such as resetting the user's password. In order to validate the URL, the same hash can be generated again, from the same information, and compared to the hash value from the URL. The hash contains the time stamp, the user's last login time, the numeric user ID, and the

user_pass_reset_url

user_pass_reset_url($account, $options = array()) Generates a unique URL for a user to log in and reset their password. Parameters \Drupal\user\UserInterface $account: An object containing the user account. array $options: (optional) A keyed array of settings. Supported options are: langcode: A language code to be used when generating locale-sensitive URLs. If langcode is NULL the users preferred language is used. Return value string A unique URL that provides a one-time log in for the use

USER_REGISTER_VISITORS

Visitors can create their own accounts. File core/modules/user/user.module, line 42 Enables the user registration and login system. Code const USER_REGISTER_VISITORS = 'visitors';

user_picture_enabled

user_picture_enabled() Returns whether this site supports the default user picture feature. This approach preserves compatibility with node/comment templates. Alternate user picture implementations (e.g., Gravatar) should provide their own add/edit/delete forms and populate the 'picture' variable during the preprocess stage. File core/modules/user/user.module, line 130 Enables the user registration and login system. Code function user_picture_enabled() { $field_definitions = \Drupal::entity