? logintoboggan/.svn ? logintoboggan/LICENSE.txt ? logintoboggan/po/.svn Index: logintoboggan/logintoboggan.install =================================================================== RCS file: /cvs/drupal/contributions/modules/logintoboggan/logintoboggan.install,v retrieving revision 1.10 diff -u -p -r1.10 logintoboggan.install --- logintoboggan/logintoboggan.install 11 Oct 2006 15:49:42 -0000 1.10 +++ logintoboggan/logintoboggan.install 6 Jan 2009 08:16:10 -0000 @@ -118,4 +118,7 @@ function logintoboggan_uninstall() { variable_del('toboggan_redirect_on_confirm'); variable_del('login_successful'); variable_del('toboggan_min_pass_length'); + variable_del('toboggan_preauth_welcome_msg'); + variable_del('toboggan_welcome_msg'); + variable_del('toboggan_validate_success_msg'); } \ No newline at end of file Index: logintoboggan/logintoboggan.module =================================================================== RCS file: /cvs/drupal/contributions/modules/logintoboggan/logintoboggan.module,v retrieving revision 1.83.2.39 diff -u -p -r1.83.2.39 logintoboggan.module --- logintoboggan/logintoboggan.module 9 Jun 2008 19:17:00 -0000 1.83.2.39 +++ logintoboggan/logintoboggan.module 6 Jan 2009 08:16:11 -0000 @@ -288,13 +288,13 @@ function logintoboggan_user_register_sub // Compose the appropriate user message--admin approvals don't require a validation e-mail. if($reg_pass_set && variable_get('user_register', 1) == 1) { if ($pre_auth) { - $message = t('A validation e-mail has been sent to your e-mail address. In order to gain full access to the site, you will need to follow the instructions in that message.'); + $message = variable_get('toboggan_preauth_welcome_msg', _logintoboggan_messages('preauth_welcome_msg')); } else { $message = ''; } } else { - $message = t('Your password and further instructions have been sent to your e-mail address.'); + $message = variable_get('toboggan_welcome_msg', _logintoboggan_messages('welcome_msg')); } if (variable_get('user_register', 1) == 1) { @@ -621,6 +621,32 @@ function logintoboggan_main_settings() { '#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 node/35, or to the <front> page. You may also use %uid as a variable, and the user\'s user ID will be substituted in the path.'), ); + $form['messages'] = array( + '#type' => 'fieldset', + '#title' => t('Messages'), + ); + + $form['messages']['toboggan_preauth_welcome_msg'] = array( + '#type' => 'textarea', + '#title' => t('Preauthentication welcome message'), + '#default_value' => variable_get('toboggan_preauth_welcome_msg', _logintoboggan_messages('toboggan_preauth_welcome_msg')), + '#description' => t('After registering, if "Set password & Immediate login" is selected, a message will be displayed to the user telling them to validate their email address. You can customize that message here.'), + ); + + $form['messages']['toboggan_welcome_msg'] = array( + '#type' => 'textarea', + '#title' => ('Welcome message'), + '#default_value' => variable_get('toboggan_welcome_msg', _logintoboggan_messages('toboggan_welcome_msg')), + '#description' => t('If you are not using "Set password & Immediate login", you can customize that welcome message here.'), + ); + + $form['messages']['toboggan_validate_success_msg'] = array( + '#type' => 'textarea', + '#title' => t('Validate success message'), + '#default_value' => variable_get('toboggan_validate_success_msg', _logintoboggan_messages('toboggan_validate_success_msg')), + '#description' => t('When a user validates their email address, a message is display to the user. You can customize that message here.'), + ); + $form['other'] = array('#type' => 'fieldset', '#title' => t('Other'), '#tree' => FALSE, @@ -796,7 +822,7 @@ function logintoboggan_validate_email($u case 'login': // Only show the validated message if there's a valid pre-auth role. if ($pre_auth) { - drupal_set_message(t('You have successfully validated your e-mail address.')); + drupal_set_message(variable_get('toboggan_validate_success_msg', _logintoboggan_messages('validate_success_msg'))); } if (!$account->status) { drupal_set_message(t('Your account is currently blocked -- login cancelled.'), 'error'); @@ -993,6 +1019,17 @@ function logintoboggan_flip_user_email_v variable_set('user_email_verification', $value); } +function _logintoboggan_messages($messsage_id) { + switch ($messsage_id) { + case 'toboggan_preauth_welcome_msg': + return t('A validation e-mail has been sent to your e-mail address. In order to gain full access to the site, you will need to follow the instructions in that message.'); + case 'toboggan_welcome_msg': + return t('Your password and further instructions have been sent to your e-mail address.'); + case 'toboggan_validate_success_msg': + return t('You have successfully validated your e-mail address.'); + } +} + /** * * THEME FUNCTIONS!