From 80f34e5ab0c7b08e409fad2c6d148fa933423ce3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 29 Dec 2003 17:14:27 +0000 Subject: - XHTML improvements: -> . Patch by Stefan. --- modules/user/user.module | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 50472e08c..eb7044b6e 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -759,7 +759,7 @@ function user_pass($edit = array()) { ** Display form: */ - $output .= "

". sprintf(t("Enter your username %sor%s your e-mail address."), "", "") ."

"; + $output .= "

". sprintf(t("Enter your username %sor%s your e-mail address."), "", "") ."

"; $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64); $output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64); $output .= form_submit(t("E-mail new password")); @@ -843,7 +843,7 @@ function user_register($edit = array()) { if ($account->uid == 1) { user_mail($edit["mail"], t("drupal user account details for %s", array("%s" => $edit["name"])), strtr(t("%username,\n\nYou may now login to %uri using the following username and password:\n\n username: %username\n password: %password\n\n". url("user/edit") ."\n\n--drupal"), $variables), "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from"); // This should not be t()'ed. No point as its only shown once in the sites lifetime, and it would be bad to store the password - $output .= "

Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please configure your e-mail settings using the Administration pages.

Your password is $pass. You may change your password on the next page.

Please login below.

"; + $output .= "

Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please configure your e-mail settings using the Administration pages.

Your password is $pass. You may change your password on the next page.

Please login below.

"; $output .= form_hidden("destination", url("user/edit")); $output .= form_hidden("name", $account->name); $output .= form_hidden("pass", $pass); @@ -1588,16 +1588,16 @@ function user_help($section = "admin/help#user") { $output .= t("Access rules allow Drupal administrators to choose usernames and e-mail address that are prevented from using drupal. To enter the mask for e-mail addresses click on %e-mail, for the username mask click on %username.", array("%e-mail" => l(t("e-mail rules"), "admin/user/access/mail"), "%username" => l(t("name rules"), "admin/user/access/user"))); break; case 'admin/user/access/mail': - $output .= t("Setup and test the e-mail access rules. The access function checks if you match a deny and not an allow. If you match only a deny then it is denied. Any other case, such as both a deny and an allow pattern matching, allows the pattern.
Notes:
  • To delete a rule click on \"delete rule\".
  • The order of the rules does not matter.
"); + $output .= t("Setup and test the e-mail access rules. The access function checks if you match a deny and not an allow. If you match only a deny then it is denied. Any other case, such as both a deny and an allow pattern matching, allows the pattern.
Notes:
  • To delete a rule click on \"delete rule\".
  • The order of the rules does not matter.
"); break; case 'admin/user/access/user': - $output .= t("Setup and test the Username access rules. The access function checks if you match a deny and not an allow. If you do then it is denied. Any other case, such as a deny pattern and an allow pattern, allows the pattern.
Notes:
  • To delete a rule click on \"delete rule\".
  • The order of the rules does not matter.
"); + $output .= t("Setup and test the Username access rules. The access function checks if you match a deny and not an allow. If you do then it is denied. Any other case, such as a deny pattern and an allow pattern, allows the pattern.
Notes:
  • To delete a rule click on \"delete rule\".
  • The order of the rules does not matter.
"); break; case 'admin/user/permission': - $output .= t("In this area you will define the permissions for each user role (role names are defined on the %role). Each permission describes a fine-grained logical operation, such as being able to access the administration pages, or adding/modifying a user account. You could say a permission represents access granted to a user to perform a set of operations.", array("%role" => l(t("user roles page"), "admin/user/role"))); + $output .= t("In this area you will define the permissions for each user role (role names are defined on the %role). Each permission describes a fine-grained logical operation, such as being able to access the administration pages, or adding/modifying a user account. You could say a permission represents access granted to a user to perform a set of operations.", array("%role" => l(t("user roles page"), "admin/user/role"))); break; case 'admin/user/role': - $output .= "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 %permission. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the names of the various roles. To delete a role choose \"edit role\".
By default, Drupal comes with two user roles:"; + $output .= "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 %permission. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the names of the various roles. To delete a role choose \"edit role\".
By default, Drupal comes with two user roles:"; $output .= "
    "; $output .= "
  • Anonymous user: this role is used for users that don't have a user account or that are not authenticated.
  • "; $output .= "
  • Authenticated user: this role is assigned automatically to authenticated users. Most registered users will belong to this user role unless specified otherwise.
  • "; @@ -1684,7 +1684,7 @@ function user_help($section = "admin/help#user") { }"; $output .= "

    The _auth function is the heart of any authentication module. This function is called whenever a user is attempting to login using your authentication module. For successful authentications, this function returns TRUE. Otherwise, it returns FALSE. This function always accepts 3 parameters, as shown above. These parameters are passed by the user system (user module). The user system parses the username as typed by the user into 2 substrings - \$name and \$server. The parsing rules are:

    "; $output .= "
    _auth function parameters
    \$nameThe substring before the final '@' character in the username field
    \$passThe whole string submitted by the user in the password field
    \$serverThe substring after the final '@' symbol in the username field
    "; - $output .= "

    So now lets use that \$name, \$pass, and \$server which was passed to our _auth function. Blogger authenticates users via %xml. Your module may authenticate using a different technique. Drupal doesn't reallly care how your module communicates with its registration source. It just trusts the module.

    "; + $output .= "

    So now lets use that \$name, \$pass, and \$server which was passed to our _auth function. Blogger authenticates users via %xml. Your module may authenticate using a different technique. Drupal doesn't reallly care how your module communicates with its registration source. It just trusts the module.

    "; $output .= "

    The lines above illustrate a typical %xml method call. Here we build up a message and send it to Blogger, storing the response in a variable called \$response. The message we pass conforms to the published %blogger-api. Your module will no doubt implement a different API. One peculiarity of this module is that we don't actually use the \$server parameter. Blogger only accepts authentication at plant.blogger.com, so we hard-code that value into the xmlrpc_client() function. A more typical example might be the jabber module, which uses the \$server parameter to determine where to send the authentication request. Also of note is the '5'th parameter in the \$client->send\(\) call. This is a timeout value in seconds. All authentication modules should implement a timeout on their external calls. This makes sure to return control to the user module if your registration database has become inoperable or unreachable.

    "; $output .= "
       if (\$result && !stristr(\$result->serialize(), "fault")) {
    @@ -1726,7 +1726,7 @@ function user_help($section = "admin/help#user") {
           // end of user_help_devel_da
     
           // start of user_help_devel_userhook
    -      $output .= "

    module_user()

    The _user() hook provides a mechanism for inserting text and form fields into the %registration, %user-acct, and %user-admin pages. This is useful if you want to add a custom field for your particular community. This is best illustrated by the %profile-module. The profile module is meant to be customized for your needs. Please download it and hack away until it does what you need.

    "; + $output .= "

    module_user()

    The _user() hook provides a mechanism for inserting text and form fields into the %registration, %user-acct, and %user-admin pages. This is useful if you want to add a custom field for your particular community. This is best illustrated by the %profile-module. The profile module is meant to be customized for your needs. Please download it and hack away until it does what you need.

    "; $output .= "

    Consider this simpler example from a fictional recipe community web site called Julia's Kitchen. Julia customizes her Drupal powered site by creating a new file called julia.module. That file does the following:

      "; $output .= "
    • new members must agree to Julia's Privacy Policy on the reg page.
    • "; -- cgit v1.2.3