You are here

function user_registrationpassword_set_message in User registration password 7

Same name and namespace in other branches
  1. 8 user_registrationpassword.module \user_registrationpassword_set_message()

Simple message and redirect.

2 calls to user_registrationpassword_set_message()
user_registrationpassword_confirm_account in ./user_registrationpassword.pages.inc
Menu callback; process one time login link.
_user_registrationpassword_user_pass_submit in ./user_registrationpassword.module
Implements submit function.

File

./user_registrationpassword.module, line 522
Enables password creation on registration form.

Code

function user_registrationpassword_set_message($type = 'welcome', $redirect = '') {

  // Select what message to display.
  switch ($type) {
    case 'linkerror':
      drupal_set_message(t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.'));

      // Redirect to user/pass.
      if (!empty($redirect)) {
        drupal_goto('user/password');
      }
      break;
    case 'welcome':
      drupal_set_message(t('Further instructions have been sent to your e-mail address.'));

      // Redirect to front.
      if (!empty($redirect)) {
        drupal_goto();
      }
      break;
  }
}