我在 drupal 6 中创建了一个重置密码表单。提交时我必须重定向到同一页面显示 Drupal 消息。
我写了以下内容:
global $language;
$account = $form_state['values']['account'];
_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/password';
return;
}
但我的邮件代码工作正常,但我的消息没有显示。