From e8aeecd97e21eabf1a2093c169293dd33ed9cf9b Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 26 May 2008 14:55:24 +0000 Subject: Make sure password resets happen on the main blog git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1312 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-login.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wp-login.php') diff --git a/wp-login.php b/wp-login.php index 121369a..bfa0b46 100644 --- a/wp-login.php +++ b/wp-login.php @@ -57,7 +57,7 @@ function login_header($title = 'Login', $message = '', $wp_error = '') { } // End of login_header() function retrieve_password() { - global $wpdb; + global $wpdb, $current_site; $errors = new WP_Error(); @@ -99,12 +99,12 @@ function retrieve_password() { $wpdb->query($wpdb->prepare("UPDATE $wpdb->users SET user_activation_key = %s WHERE user_login = %s", $key, $user_login)); //} $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n"; - $message .= get_option('siteurl') . "\r\n\r\n"; + $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n"; $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; - $message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n"; + $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "wp-login.php?action=rp&key=$key\r\n"; - if ( !wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message) ) + if ( !wp_mail($user_email, sprintf(__('[%s] Password Reset'), $current_site->site_name), $message) ) die('

' . __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') . '

'); return true; -- cgit