You are here

function user_pass_submit in Drupal 6

Same name and namespace in other branches
  1. 4 modules/user.module \user_pass_submit()
  2. 5 modules/user/user.module \user_pass_submit()
  3. 7 modules/user/user.pages.inc \user_pass_submit()

File

modules/user/user.pages.inc, line 68
User page callback file for the user module.

Code

function user_pass_submit($form, &$form_state) {
  global $language;
  $account = $form_state['values']['account'];

  // Mail one time login URL and instructions using current language.
  _user_mail_notify('password_reset', $account, $language);
  watchdog('user', 'Password reset instructions mailed to %name at %email.', array(
    '%name' => $account->name,
    '%email' => $account->mail,
  ));
  drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
  $form_state['redirect'] = 'user';
  return;
}