Changeset 2895

Show
Ignore:
Timestamp:
09/20/05 17:55:16 (3 years ago)
Author:
ryan
Message:

Don't reset user cookies when editing other users. Props donncha. fixes #1689

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/registration-functions.php

    r2883 r2895  
    7575 
    7676function wp_update_user($userdata) { 
    77     global $wpdb
     77    global $wpdb, $current_user
    7878 
    7979    $ID = (int) $userdata['ID']; 
     
    9696 
    9797    // Update the cookies if the password changed.   
    98     if ( isset($plaintext_pass) ) { 
    99         wp_clearcookie(); 
    100         wp_setcookie($userdata['user_login'], $plaintext_pass); 
     98    if( $current_user->id == $ID ) { 
     99        if ( isset($plaintext_pass) ) { 
     100            wp_clearcookie(); 
     101            wp_setcookie($userdata['user_login'], $plaintext_pass); 
     102        } 
    101103    } 
    102104