Change title if required; using <none> can make for a very neat login system,\r
when combined with the javascript functionality: clicking upon "Login/register"\r
reveals the login form in neat sliding fashion. To select this functionality,\r
-select 'Collapsible form' under "Block type". Selecting 'Link' under "Block\r
+select 'Collapsible form' under "Block type". Selecting 'Link' under "Block\r
type" sends user to a login form, returning them to original page after\r
successful login.\r
\r
a. Be very careful when editing the 'Non-authenticated role' setting.\r
If you set it to anything other than the 'authenticated user' role,\r
LoginToboggan will happily start deleting any users you have in that\r
- role that were created prior to the purge interval. If you want to\r
+ role that were created prior to the purge interval. If you want to\r
avoid problems, it's best to never change that setting after you've\r
initially set it up.\r
\r
<?php
/**
- * Implementation of hook_update_1(). This is a placeholder in case table
+ * Implementation of hook_update_1(). This is a placeholder in case table
* installation is ever necessary for the module.
*/
function logintoboggan_update_1() {
if (variable_get('toboggan_role', 2) == 1) {
variable_set('toboggan_role', 2);
- drupal_set_message(t('Your previous setting for the logintoboggan pre-auth role was the anonymous user role, which is no longer allowed. The pre-auth role has now been set to the authenticated user role for your site. <em>Because of this change, all unvalidated users on your site now have authenticated user permissions!</em> If you wish to retain the previous functionality, create a new user role with the same access permissions as the anonymous user, and set the logintoboggan pre-auth role to the newly created role. You will also need to manually add any previously unvalidated users to the newly created pre-auth role.'), 'error');
+ drupal_set_message(t('Your previous setting for the logintoboggan pre-auth role was the anonymous user role, which is no longer allowed. The pre-auth role has now been set to the authenticated user role for your site. <em>Because of this change, all unvalidated users on your site now have authenticated user permissions!</em> If you wish to retain the previous functionality, create a new user role with the same access permissions as the anonymous user, and set the logintoboggan pre-auth role to the newly created role. You will also need to manually add any previously unvalidated users to the newly created pre-auth role.'), 'error');
}
return array();
}
'toboggan_min_pass_length' => 0,
);
- // Rename poorly named variables. Note that we're not renaming
+ // Rename poorly named variables. Note that we're not renaming
// 'logintoboggan_immediate_login_on_register' here, as that variable
// name is ok.
$variables = array(
if ($account->uid && $in_pre_auth_role) {
if ($id != DRUPAL_AUTHENTICATED_RID) {
unset($account->roles[DRUPAL_AUTHENTICATED_RID]);
- // Reset the permissions cache. Since the only
+ // Reset the permissions cache. Since the only
// goal here is to reset the cache, create a
// temporary account object for uid 1 -- this
// results in no hits on the database.
'#type' => 'checkbox',
'#title' => t('Set password'),
'#default_value' => !variable_get('user_email_verification', TRUE) ? 1 : 0,
- '#description' => t("This will allow users to choose their initial password when registering (note that this setting is merely a mirror of the <a href=\"!settings\">Require e-mail verification when a visitor creates an account</a> setting, and is merely here for convenience). If selected, users will be assigned to the role below. They will not be assigned to the 'authenticated user' role until they confirm their e-mail address by following the link in their registration e-mail. It is HIGHLY recommended that you set up a 'pre-authorized' role with limited permissions for this purpose. <br />NOTE: If you enable this feature, you should edit the <a href=\"!settings\">Welcome, no approval required</a> text.", array('!settings' => url('admin/user/settings'))) . $help_text,
+ '#description' => t("This will allow users to choose their initial password when registering (note that this setting is merely a mirror of the <a href=\"!settings\">Require e-mail verification when a visitor creates an account</a> setting, and is merely here for convenience). If selected, users will be assigned to the role below. They will not be assigned to the 'authenticated user' role until they confirm their e-mail address by following the link in their registration e-mail. It is HIGHLY recommended that you set up a 'pre-authorized' role with limited permissions for this purpose. <br />NOTE: If you enable this feature, you should edit the <a href=\"!settings\">Welcome, no approval required</a> text.", array('!settings' => url('admin/user/settings'))) . $help_text,
);
- // Grab the roles that can be used for pre-auth. Remove the anon role, as it's not a valid choice.
+ // Grab the roles that can be used for pre-auth. Remove the anon role, as it's not a valid choice.
$roles = user_roles(1);
$form ['registration']['logintoboggan_pre_auth_role'] = array(
menu_set_active_item('user');
$return = menu_execute_active_handler();
drupal_set_title(t('Access Denied / User Login'));
- drupal_set_message(t('Access denied. You may need to login below or register to access this page.'), 'error');
+ drupal_set_message(t('Access denied. You may need to login below or register to access this page.'), 'error');
}
else {
drupal_set_title(t('Access Denied'));
$pre_auth = !variable_get('user_email_verification', TRUE) && $validating_id != DRUPAL_AUTHENTICATED_RID;
if ($pre_auth) {
// Check to see if an admin has manually removed the pre-auth role from
- // the user. If so, send the account activation email.
+ // the user. If so, send the account activation email.
// The logic here is a bit funky, but necessary because we have no way
// of knowing if a missing $edit['roles'][$validating_id] is because
// the pre-auth role was disabled on this page save or a previous save.
}
/**
- * Flips the value of the user_email_settings variable. This setting is less confusing when it works the opposite
+ * Flips the value of the user_email_settings variable. This setting is less confusing when it works the opposite
* of it's current core behavior.
*/
function logintoboggan_flip_user_email_verification($form, &$form_state) {
* @see drupal_mail()
*
* @param $op
- * The operation being performed on the account. Possible values:
+ * The operation being performed on the account. Possible values:
* 'register_admin_created': Welcome message for user created by the admin
* 'register_no_approval_required': Welcome message when user self-registers
* 'register_pending_approval': Welcome message, user pending admin approval
* 'status_deleted': Account deleted
*
* @param $account
- * The user object of the account being notified. Must contain at
+ * The user object of the account being notified. Must contain at
* least the fields 'uid', 'name', and 'mail'.
* @param $login_url
* The custom !login_url setting. User default is used if none is provided.
$message['subject'] .= t("(!site) Account application for !username", $variables, $langcode);
$reg_pass_set = !variable_get('user_email_verification', TRUE);
if ($reg_pass_set) {
- $message['body'][] = t("!username has applied for an account, and has automatically received the permissions of the LoginToboggan validating role. To give the user full site permissions, click the link below:\n\n!validating_url\n\nAlternatively, you may visit their user account listed below and remove them from the validating role.\n\n!edit_uri", $variables, $langcode);
+ $message['body'][] = t("!username has applied for an account, and has automatically received the permissions of the LoginToboggan validating role. To give the user full site permissions, click the link below:\n\n!validating_url\n\nAlternatively, you may visit their user account listed below and remove them from the validating role.\n\n!edit_uri", $variables, $langcode);
}
else {
$message['body'][] = t("!username has applied for an account.\n\n!edit_uri", $variables, $langcode);