Changeset 1312

Show
Ignore:
Timestamp:
05/26/08 14:55:24 (6 months ago)
Author:
donncha
Message:

Make sure password resets happen on the main blog

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-login.php

    r1273 r1312  
    5858 
    5959function retrieve_password() { 
    60         global $wpdb
     60        global $wpdb, $current_site
    6161 
    6262        $errors = new WP_Error(); 
     
    100100        //} 
    101101        $message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n"; 
    102         $message .= get_option('siteurl') . "\r\n\r\n"; 
     102        $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n"; 
    103103        $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; 
    104104        $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n"; 
    105         $message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n"; 
    106  
    107         if ( !wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message) ) 
     105        $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "wp-login.php?action=rp&key=$key\r\n"; 
     106 
     107        if ( !wp_mail($user_email, sprintf(__('[%s] Password Reset'), $current_site->site_name), $message) ) 
    108108                die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>'); 
    109109