WordPress.org

Make WordPress Core

Changeset 2895


Ignore:
Timestamp:
09/20/2005 05:55:16 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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   
Note: See TracChangeset for help on using the changeset viewer.