You are here

function logintoboggan_resend_validation in LoginToboggan 7

Same name and namespace in other branches
  1. 5 logintoboggan.module \logintoboggan_resend_validation()
  2. 6 logintoboggan.module \logintoboggan_resend_validation()

Re-sends validation e-mail to user specified by $uid.

1 string reference to 'logintoboggan_resend_validation'
logintoboggan_menu in ./logintoboggan.module
Implement hook_menu()

File

./logintoboggan.validation.inc, line 86
Validation functions for LoginToboggan module.

Code

function logintoboggan_resend_validation($account) {
  $account->password = t('If required, you may reset your password from: !url', array(
    '!url' => url('user/password', array(
      'absolute' => TRUE,
    )),
  ));
  _user_mail_notify('register_no_approval_required', $account);

  // Notify admin or user that e-mail was sent and return to user edit form.
  if (user_access('administer users')) {
    drupal_set_message(t("A validation e-mail has been sent to the user's e-mail address."));
  }
  else {
    drupal_set_message(t('A validation e-mail has been sent to your e-mail address. You will need to follow the instructions in that message in order to gain full access to the site.'));
  }
  drupal_goto('user/' . $account->uid . '/edit');
}