You are here

function user_help in Drupal 4

Same name and namespace in other branches
  1. 8 core/modules/user/user.module \user_help()
  2. 5 modules/user/user.module \user_help()
  3. 6 modules/user/user.module \user_help()
  4. 7 modules/user/user.module \user_help()
  5. 9 core/modules/user/user.module \user_help()

Implementation of hook_help().

1 call to user_help()
user_help_page in modules/user.module
Menu callback; Prints user-specific help information.

File

modules/user.module, line 2046
Enables the user registration and login system.

Code

function user_help($section) {
  global $user;
  switch ($section) {
    case 'admin/help#user':
      $output = '<p>' . t('The user module allows users to register, login, and logout. Users benefit from being able to sign on because it associates content they create with their account and allows various permissions to be set for their roles.  The user module supports user roles which can setup fine grained permissions allowing each role to do only what the administrator wants them to. Each user is assigned to one or more roles. By default there are two roles <em>anonymous</em> - a user who has not logged in, and <em>authenticated</em> a user who has signed up and who has been authorized. ') . '</p>';
      $output .= '<p>' . t('Users can use their own name or handle and can fine tune some personal configuration settings through their individual my account page.  Registered users need to authenticate by supplying either a local username and password, or a remote username and password such as DelphiForums ID, or one from a Drupal powered website.  A visitor accessing your website is assigned an unique ID, the so-called session ID, which is stored in a cookie. For security\'s sake, the cookie does not contain personal information but acts as a key to retrieve the information stored on your server. ') . '</p>';
      $output .= t('<p>You can</p>
<ul>
<li>view your <a href="%user">user page</a>.</li>
<li>administer users at <a href="%admin-user">administer &gt;&gt; user</a>.</li>
<li>allow users who have the "select different theme" permission to select themes from their user account by enabling themes in <a href="%admin-themes">administer &gt;&gt; themes</a>.</li>
<li>read user profile help at <a href="%admin-help-profile">administer &gt;&gt; help &gt;&gt; profile</a>.</li>
<li>read about distributed authentication in the system module help at <a href="%admin-help-system">administer &gt;&gt; help &gt;&gt; system</a>.</li>
</ul>
', array(
        '%user' => url('user'),
        '%admin-user' => url('admin/user'),
        '%admin-themes' => url('admin/themes'),
        '%admin-help-profile' => url('admin/help/profile'),
        '%admin-help-system' => url('admin/help/system'),
      ));
      $output .= '<p>' . t('For more information please read the configuration and customization handbook <a href="%user">User page</a>.', array(
        '%user' => 'http://drupal.org/handbook/modules/user/',
      )) . '</p>';
      return $output;
    case 'admin/modules#description':
      return t('Manages the user registration and login system.');
    case 'admin/user':
      return t('<p>Drupal allows users to register, login, logout, maintain user profiles, etc. No participant can use his own name to post content until he signs up for a user account.</p>');
    case 'admin/user/create':
    case 'admin/user/account/create':
      return t('<p>This web page allows the administrators to register a new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.</p>');
    case strstr($section, 'admin/access/rules'):
      return t('<p>Set up username and e-mail address access rules for new <em>and</em> existing accounts (currently logged in accounts will not be logged out). If a username or e-mail address for an account matches any deny rule, but not an allow rule, then the account will not be allowed to be created or to log in. A host rule is effective for every page view, not just registrations.</p>');
    case 'admin/access':
      return t('<p>Permissions let you control what users can do on your site.  Each user role (defined on the <a href="%role">user roles page</a>) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.</p>', array(
        '%role' => url('admin/access/roles'),
      ));
    case 'admin/access/roles':
      return t('<p>Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in <a href="%permissions">user permissions</a>. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the <em>role names</em> of the various roles. To delete a role choose "edit".</p><p>By default, Drupal comes with two user roles:</p>
      <ul>
      <li>Anonymous user: this role is used for users that don\'t have a user account or that are not authenticated.</li>
      <li>Authenticated user: this role is automatically granted to all logged in users.</li>
      </ul>', array(
        '%permissions' => url('admin/access/permissions'),
      ));
    case 'admin/user/search':
      return t('<p>Enter a simple pattern ("*" may be used as a wildcard match) to search for a username.  For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda".</p>');
    case 'admin/user/configure':
    case 'admin/user/configure/settings':
      return t('<p>In order to use the full power of Drupal a visitor must sign up for an account. This page lets you setup how a user signs up, logs out, the guidelines from the system about user subscriptions, and the e-mails the system will send to the user.</p>');
    case 'user/help#user':
      $site = variable_get('site_name', 'this website');
      $output = t("\n      <h3>Distributed authentication<a id=\"da\"></a></h3>\n      <p>One of the more tedious moments in visiting a new website is filling out the registration form. Here at %site, you do not have to fill out a registration form if you are already a member of %help-links. This capability is called <em>distributed authentication</em>, and is unique to <a href=\"%drupal\">Drupal</a>, the software which powers %site.</p>\n      <p>Distributed authentication enables a new user to input a username and password into the login box, and immediately be recognized, even if that user never registered at %site. This works because Drupal knows how to communicate with external registration databases. For example, lets say that new user 'Joe' is already a registered member of <a href=\"%delphi-forums\">Delphi Forums</a>. Drupal informs Joe on registration and login screens that he may login with his Delphi ID instead of registering with %site. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then contacts the <em>remote.delphiforums.com</em> server behind the scenes (usually using <a href=\"%xml\">XML-RPC</a>, <a href=\"%http-post\">HTTP POST</a>, or <a href=\"%soap\">SOAP</a>) and asks: \"Is the password for user Joe correct?\".  If Delphi replies yes, then we create a new %site account for Joe and log him into it.  Joe may keep on logging into %site in the same manner, and he will always be logged into the same account.</p>", array(
        '%help-links' => implode(', ', user_auth_help_links()),
        '%site' => "<em>{$site}</em>",
        '%drupal' => 'http://drupal.org',
        '%delphi-forums' => 'http://www.delphiforums.com',
        '%xml' => 'http://www.xmlrpc.com',
        '%http-post' => 'http://www.w3.org/Protocols/',
        '%soap' => 'http://www.soapware.org',
      ));
      foreach (module_list() as $module) {
        if (module_hook($module, 'auth')) {
          $output .= "<h4><a id=\"{$module}\"></a>" . module_invoke($module, 'info', 'name') . '</h4>';
          $output .= module_invoke($module, 'help', "user/help#{$module}");
        }
      }
      return $output;
  }
}