You are here

function anonymous_login_help in Anonymous login 8

Same name and namespace in other branches
  1. 8.2 anonymous_login.module \anonymous_login_help()

Implements hook_help().

File

./anonymous_login.module, line 13
This is the module to redirect anonymous user to the login page.

Code

function anonymous_login_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.anonymous_login':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('This module will redirect anonymous users to the login page whenever they reach any admin-specified page paths, and will direct them back to the originally-requested page after successful login.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Include paths') . '</dt>';
      $output .= '<dd>' . t('Included paths are those that will redirect the user to the login page.<br/>Simply enter <em>"*"</em> as the only path to redirect and all anonymous traffic will be redirected to the login page. With this module enabled and configured to act on <em>node/*/edit</em> paths, if a user clicks a link to <em>site.com/node/123/edit</em>, they will be redirected to <em>site.com/user/login?destination=node/123/edit</em>.') . '</dd>';
      $output .= '<dt>' . t('Exclude paths') . '</dt>';
      $output .= '<dd>' . t('Excluded paths are those that will not redirect the user.<br/>Prefix a path with <em>"~"</em> to exclude it from being redirected.') . '</dd>';
      $output .= '</dl>';
      return $output;
  }
}