You are here

userone.module in User One 8

Same filename and directory in other branches
  1. 6 userone.module
  2. 7 userone.module

User One module.

Provide limited access to user one account even from administrators.

File

userone.module
View source
<?php

/**
 * @file
 * User One module.
 *
 * Provide limited access to user one account even from administrators.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function userone_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.userone':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The User One module provides limited access to user one account and augment Drupal core to discourage brute-force login attacks. It helps protect user one account from users with permissions to administer users.') . '</p>';
      $output .= '<h3>' . t('Features') . '</h3>';
      $output .= '<ul>';
      $output .= '<li>' . t("User one account is protected from viewing and editing. Users -- even with 'Administer users' permission -- will be denied access.") . '</li>';
      $output .= '<li>' . t('User one account is hidden from user listing page, /admin/people.') . '</li>';
      $output .= '<li>' . t("User one account is hidden from user lists such as in blocks, Who's New and Who's Online. User One provides its own version of Who's Online block for correct count of logged in users besides hiding user one.") . '</li>';
      $output .= '<li>' . t("User One exposes Drupal's built-in values to change otherwise inaccessible such as number of allowed login attempts and time window to remember such login attempts.") . '</li>';
      $output .= '<li>' . t('While Drupal temporarily deny login after multiple failed logins, User One goes one step further to allow permanently block such IPs automatically and notify the site admin.') . '</li>';
      $output .= '</ul>';
      return [
        '#markup' => $output,
      ];
  }
}

Functions

Namesort descending Description
userone_help Implements hook_help().