Index: logintoboggan.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/logintoboggan/logintoboggan.module,v
retrieving revision 1.83.2.4
diff -u -r1.83.2.4 logintoboggan.module
--- logintoboggan.module	28 Apr 2007 05:38:49 -0000	1.83.2.4
+++ logintoboggan.module	27 Jun 2007 01:22:27 -0000
@@ -45,9 +45,9 @@
       <li>Optionally redirect the user to a specific page upon validation of their e-mail address.</li>
       <li>Optionally display a user message indicating a successful login.</li>
       </ol>
-      These features may be turned on or off in the Login Toboggan <a href="%url">settings</a>.</p>
-      <p>Because this module completely reorients the Drupal login process you will probably want to edit the welcome e-mail on the user settings page. For instance if you have enabled the "Set password & Immediate Login" option, you probably should not send the user\'s password out in the welcome e-mail (also note when the "Set password & Immediate Login" option is enabled, the %login_url becomes a verification url that the user MUST visit in order to enable authenticated status). The following is an example welcome e-mail:</p>
-      ', array('%url' => url('admin/user/logintoboggan')));
+      These features may be turned on or off in the Login Toboggan <a href="!url">settings</a>.</p>
+      <p>Because this module completely reorients the Drupal login process you will probably want to edit the welcome e-mail on the user settings page. For instance if you have enabled the "Set password & Immediate Login" option, you probably should not send the user\'s password out in the welcome e-mail (also note when the "Set password & Immediate Login" option is enabled, the !login_url becomes a verification url that the user MUST visit in order to enable authenticated status). The following is an example welcome e-mail:</p>
+      ', array('!url' => url('admin/user/logintoboggan')));
       $output .= drupal_get_form('logintoboggan_example_help');
       $output .= t('<p>Note that if you have set the "Visitors can create accounts but administrator approval is required" option for account approval, and are also using the "Set password & Immediate Login" feature of logintoboggan, the user will immediately receive the permissions of the pre-authorized user role--you may wish to create a pre-authorized role with the exact same permissions as the anonymous user if you wish the newly created user to only have anonymous permissions.</p><p>In order for a site administrator to unblock a user who is awaiting administrator approval, they must either click on the validation link they receive in their notification e-mail, or manually remove the user from the site\'s pre-authorized role--afterwards the user will then receive "authenticated user" permissions (if you are using the "Visitors can create accounts and no administrator approval is required" option, removal of the pre-authorized role will happen automatically when the user validates their account via e-mail).</p><p>Also be aware that logintoboggan only affects registrations initiated by users--any user account created by an administrator will not use any logintoboggan functionality.');
       return $output;
@@ -155,7 +155,7 @@
         $form['#validate'] = array('logintoboggan_user_login_validate' => array()) + $form['#validate'];
         $form['name']['#title'] = t('Username or e-mail address');
         if (variable_get('drupal_authentication_service', FALSE) && count(user_auth_help_links()) > 0) {
-          $form['name']['#description'] = t('Enter your %s username, e-mail address, or an ID from one of our affiliates: !a.', array('%s' => variable_get('site_name', 'local'), '!a' => implode(', ', user_auth_help_links())));
+          $form['name']['#description'] = t('Enter your !s username, e-mail address, or an ID from one of our affiliates: !a.', array('!s' => variable_get('site_name', 'local'), '!a' => implode(', ', user_auth_help_links())));
         }
       }
       if($GLOBALS['logintoboggan_denied'] == TRUE){
@@ -256,7 +256,7 @@
 
   $account = user_save('', array_merge($form_values, array('pass' => $pass, 'init' => $mail, 'roles' => $roles, 'status' => $status)));
 
-  watchdog('user', t('New user: %name %email.', array('%name' => $name, '%email' => "<$mail>")), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $account->uid .'/edit'));
+  watchdog('user', t('New user: !name !email.', array('!name' => $name, '!email' => "<$mail>")), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $account->uid .'/edit'));
 
   $login_url = ($reg_pass_set && variable_get('user_register', 1) == 1) ? logintoboggan_eml_validate_url($account) : user_pass_reset_url($account);
   $variables = array('!username' => $name, '!site' => variable_get('site_name', 'drupal'), '!password' => $pass, '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen(_logintoboggan_protocol() .'://')), '!mailto' => $mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '!login_url' => $login_url);
@@ -602,14 +602,14 @@
     '#type' => 'textfield',
     '#title' => t('Redirect path on Registration'),
     '#default_value' => variable_get('toboggan_redirect_on_register', ''),
-    '#description' => t('Normally, after a user registers a new account, they will be taken to the front page, or to their user page if you specify <cite>Immediate login</cite> above. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. You may also use <em>%uid</em> as a variable, and the user\'s user ID will be substituted in the path. <em>NOTE: this feature will not work if you have the user password creation feature disabled.</em>'),
+    '#description' => t('Normally, after a user registers a new account, they will be taken to the front page, or to their user page if you specify <cite>Immediate login</cite> above. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. You may also use <em>!uid</em> as a variable, and the user\'s user ID will be substituted in the path. <em>NOTE: this feature will not work if you have the user password creation feature disabled.</em>'),
   );
 
   $form['registration']['redirect']['toboggan_redirect_on_confirm'] = array(
     '#type' => 'textfield',
     '#title' => t('Redirect path on Confirmation'),
     '#default_value' => variable_get('toboggan_redirect_on_confirm', ''),
-    '#description' => t('Normally, after a user confirms their new account, they will be taken to their user page. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. You may also use <em>%uid</em> as a variable, and the user\'s user ID will be substituted in the path.'),
+    '#description' => t('Normally, after a user confirms their new account, they will be taken to their user page. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. You may also use <em>!uid</em> as a variable, and the user\'s user ID will be substituted in the path.'),
   );
 
   $form['other'] = array('#type' => 'fieldset',
@@ -747,7 +747,7 @@
     // No time out for first time login.
     if ($account->uid && !empty($account) && $timestamp < $current &&
         $hashed_pass == logintoboggan_eml_rehash($account->pass, $timestamp, $account->mail)) {
-      watchdog('user', t('E-mail validation URL used for %name with timestamp @timestamp.', array('%name' => $account->name, '@timestamp' => $timestamp)));
+      watchdog('user', t('E-mail validation URL used for !name with timestamp @timestamp.', array('!name' => $account->name, '@timestamp' => $timestamp)));
       // Update the user table noting user has logged in.
       // And this also makes this hashed password a one-time-only login.
       db_query("UPDATE {users} SET login = '%d' WHERE uid = %d", time(), $account->uid);
@@ -778,7 +778,7 @@
           // user has new permissions, so we clear their menu cache
           cache_clear_all($account->uid .':', 'cache_menu', TRUE);
 
-          drupal_set_message(t('You have successfully validated %user.', array('%user' => $account->name)));
+          drupal_set_message(t('You have successfully validated !user.', array('!user' => $account->name)));
           drupal_goto("user/$account->uid/edit");
           break;
         // Catch all.
@@ -786,7 +786,7 @@
           // user has new permissions, so we clear their menu cache
           cache_clear_all($account->uid .':', 'cache_menu', TRUE);
 
-          drupal_set_message(t('You have successfully validated %user.', array('%user' => $account->name)));
+          drupal_set_message(t('You have successfully validated !user.', array('!user' => $account->name)));
           drupal_goto('');
           break;
       }
@@ -811,7 +811,7 @@
   global $user;
   $user = $account;
 
-  watchdog('user', t('Session opened for %name.', array('%name' => $user->name)));
+  watchdog('user', t('Session opened for !name.', array('!name' => $user->name)));
 
   // Update the user table timestamp noting user has logged in.
   db_query("UPDATE {users} SET login = '%d' WHERE uid = '%s'", time(), $user->uid);
@@ -877,7 +877,7 @@
 
   // Variables to replace in e-mail
   $pass = t('If required, you may reset your password from: !url', array('!url' => url('user/password', NULL, NULL, TRUE)));
-  $variables = array('%username' => $account->name, '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen(_logintoboggan_protocol() .'://')), '%mailto' => $account->mail, '%date' => format_date(time()), '%login_uri' => url('user', NULL, NULL, TRUE), '%edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '%login_url' => logintoboggan_eml_validate_url($account));
+  $variables = array('!username' => $account->name, '!site' => variable_get('site_name', 'drupal'), '!password' => $pass, '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen(_logintoboggan_protocol() .'://')), '!mailto' => $account->mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '!login_url' => logintoboggan_eml_validate_url($account));
 
   // Prepare and send e-mail.
   $from = variable_get('site_mail', ini_get('sendmail_from'));
@@ -895,7 +895,7 @@
 }
 
 function _logintoboggan_process_redirect($redirect, $account) {
-  $variables = array('%uid' => $account->uid);
+  $variables = array('!uid' => $account->uid);
   $redirect = strtr($redirect, $variables);
 
   return $redirect;
