I almost forgot the hook

git-svn-id: http://svn.automattic.com/wordpress/trunk@2216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-05 02:22:36 +00:00
parent 639b7c93e1
commit 6bc8ea1e28
2 changed files with 9 additions and 2 deletions

View File

@ -22,6 +22,7 @@ switch($action) {
case 'logout':
wp_clearcookie();
do_action('wp_logout');
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
@ -105,6 +106,8 @@ case 'retrievepassword':
mail($user_email, sprintf(__("[%s] Password Reset"), get_settings('blogname')), $message);
$m = wp_mail($user_email, sprintf(__("[%s] Password Reset"), get_settings('blogname')), $message);
do_action('retreive_password', $user_login);
if ($m == false) {
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
echo __('Possible reason: your host may have disabled the mail() function...') . "</p>";
@ -133,6 +136,8 @@ case 'resetpass' :
$m = wp_mail($user->user_email, sprintf(__("[%s] Your new password"), get_settings('blogname')), $message);
do_action('password_reset');
if ($m == false) {
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
echo __('Possible reason: your host may have disabled the mail() function...') . "</p>";
@ -177,7 +182,7 @@ default:
if (! $using_cookie) {
wp_setcookie($user_login, $user_pass);
}
do_action('wp_login', $user_login);
header("Location: $redirect_to");
exit();
} else {

View File

@ -62,6 +62,8 @@ case 'register':
VALUES
('$user_login', MD5('$password'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$user_level', 'nickname', '$user_nicename')");
do_action('user_register', $wpdb->insert_id);
if ($result == false) {
die (sprintf(__('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_settings('admin_email')));
}