You are here

function administerusersbyrole_help in Administer Users by Role 8.2

Same name and namespace in other branches
  1. 8.3 administerusersbyrole.module \administerusersbyrole_help()

Implements hook_help().

File

./administerusersbyrole.module, line 208

Code

function administerusersbyrole_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.administerusersbyrole':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Administer Users by Role allows site builders to set up fine-grained permissions for allowing "sub-admin" users to edit and delete other users - more specific than Drupal Core\'s all-or-nothing \'administer users\' permission.  It also provides and enforces a \'create users\' permission') . '</p>';
      $output .= '<h3>' . t('Core permissions') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Administer users') . '</dt>';
      $output .= '<dd>' . t('<em>Do not</em> set this for sub-admins.  This permission bypasses all of the permissions in "Administer Users by Role".') . '</dd>';
      $output .= '<dt>' . t('View user profiles') . '</dt>';
      $output .= '<dd>' . t('Your sub-admins should probably have this permission.  (Most things work without it, but for example with a View showing users, the user name will only become a link if this permission is set.)') . '</dd>';
      $output .= '<dt>' . t('Select method for cancelling account') . '</dt>';
      $output .= '<dd>' . t('If you set this for sub-admins, then the sub-admin can choose a cancellation method when cancelling an account.  If not, then the sum-admin will always use the default cancellation method.') . '</dd>';
      $output .= '</dl>';
      $output .= '<h3>' . t('New permissions') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Access the users overview page') . '</dt>';
      $output .= '<dd>' . t('Grants access to <a href=":people">manage users page</a>. Only users that can be edited are shown.', [
        ':people' => \Drupal::url('entity.user.collection'),
      ]) . '</dd>';
      $output .= '<dt>' . t('Create new users') . '</dt>';
      $output .= '<dd>' . t('Grants access to <a href=":create">create users</a>.', [
        ':create' => \Drupal::url('user.admin_create'),
      ]) . '</dd>';
      $output .= '<dt>' . t('Allow empty user mail when managing users') . '</dt>';
      $output .= '<dd>' . t('Create and manage users that have no email address.') . '</dd>';
      $output .= '<dt>' . t('Edit users with no custom roles') . '</dt>';
      $output .= '<dd>' . t('Allows editing of any authenticated user that has no custom roles set.') . '</dd>';
      $output .= '<dt>' . t('Edit users with role XXX') . '</dt>';
      $output .= '<dd>' . t('Allows editing of any authenticated user with the specified role. To edit a user with multiple roles, the sub-admin must have permission to edit ALL of those roles. (\'Edit users with no custom roles\' is NOT needed.)') . '</dd>';
      $output .= '</dl>';
      $output .= '<p>' . t('The permission for cancel work exactly the same as those for edit.') . '</p>';
      return $output;
  }
}