You are here

function user_help in Drupal 5

Same name and namespace in other branches
  1. 8 core/modules/user/user.module \user_help()
  2. 4 modules/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/user.module
Menu callback; Prints user-specific help information.

File

modules/user/user.module, line 2391
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 log out. 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 .= '<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/user/user':
      return '<p>' . t('Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.') . '</p>';
    case 'admin/user/user/create':
    case 'admin/user/user/account/create':
      return '<p>' . t('This web page allows the administrators to register 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 'admin/user/rules':
      return '<p>' . t('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/user/access':
      return '<p>' . t('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.', array(
        '@role' => url('admin/user/roles'),
      )) . '</p>';
    case 'admin/user/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/user/access'),
      ));
    case 'admin/user/search':
      return '<p>' . t('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 'user/help#user':
      $site = variable_get('site_name', 'Drupal');
      $affiliates = user_auth_help_links();
      if (count($affiliates)) {
        $affiliate_info = implode(', ', user_auth_help_links());
      }
      else {
        $affiliate_info = t('one of our affiliates');
      }
      $output = t('
      <h3>Distributed authentication<a id="da"></a></h3>
      <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 !affiliate-info. This capability is called <em>distributed authentication</em>, and <a href="@drupal">Drupal</a>, the software which powers @site, fully supports it.</p>
      <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(
        '!affiliate-info' => $affiliate_info,
        '@site' => $site,
        '@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;
  }
}