You are here

function user_restrictions_help in User restrictions 8

Same name and namespace in other branches
  1. 7 user_restrictions.module \user_restrictions_help()

Implements hook_help().

File

./user_restrictions.module, line 27
Specifies rules for restricting the data users can set for their accounts.

Code

function user_restrictions_help($path, $arg) {
  switch ($path) {
    case 'help.page.user_restrictions':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t("The user restrictions module allows you to specify rules for allowable usernames, or e-mail addresses. A rule may either explicitly <q>allow</q> access or <q>deny</q> access based on the rule's <em>Access type</em>, <em>Rule type</em>, and <em>Pattern</em>. For <em>Username</em> and <em>E-Mail</em> rule types, if the username or e-mail address of an existing account or new registration matches the <em>Mask</em> of a <q>deny</q> rule, but not an <q>allow</q> rule, then the account will not be created (for new registrations) or able to log in (for existing accounts). The user restrictions module could also be used to prevent new users from registering with usernames like <q>Admin</q> or with e-mail addresses from certain domains. Existing logged-in users with e-mail addresses or usernames that match a <q>deny</q> rule (but not an <q>allow</q> rule) are not immediately logged out (but once they log out, may not log back in), Be careful to not create a <q>deny</q> rule that includes your administrative account.Visitors attempting to view your site from an IP address or hostname that matches a <q>deny</q> rule will receive a <q>banned address</q> message. Drupal checks incoming addresses for potential bans before any other Drupal modules or themes are loaded.") . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t("Go to /admin/modules and enable User Restrictions and User Restrictions UI module.") . '</dt>';
      $output .= '<dt>' . t("Go to /admin/config/people/user-restrictions, and click Add rule.") . '</dt>';
      $output .= '<dt>' . t("Select Access type, Rule type, Expire time, and fill the Mask field.") . '</dt>';
      $output .= '<dd>' . t("Use Access type to specifically deny or allow the matched mask.") . '</dd>';
      $output .= '<dd>' . t("Rule type is used to tell the module to restrict/allow based on username or user email.") . '</dd>';
      $output .= '<dd>' . t("Use wildcard % or _ in Mask field to match the username or email address. A % will match any number of characters, a _ will match precisely one character.") . '</dd>';
      $output .= '<dd>' . t("Set up the expired hours/days for the restriction or alternatively leave for unlimited restriction.") . '</dd>';
      $output .= '<dt>' . t("Click Save rule button and the matched user account will be restricted.") . '</dt>';
      $output .= '<dt>' . t("Edit/Delete the restriction rules in /admin/config/people/user-restrictions.") . '</dt>';
      $output .= '<dt>' . t("You can also test usernames and emails in the CHECK RULES fieldset that appears after at least one rule has been created.") . '</dt>';
      return $output;
    case 'admin/config/people/user-restrictions':
      return t("Set up rules for allowable usernames and e-mail address. A rule may either explicitly allow access or deny access based on the rule's Access type, Rule type, and Pattern. If the username or e-mail address of an existing account or new registration matches a deny rule, but not an allow rule, then the account will not be created (for new registrations) or able to log in (for existing accounts).");
  }
}