WordPress.org

Make WordPress Core

Changeset 14608


Ignore:
Timestamp:
05/13/2010 09:08:01 PM (10 years ago)
Author:
westi
Message:

Fix the default password nag clearer to work when an admin sets someone elses password away from the default. Fixes #12334.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r14588 r14608  
    835835add_action('profile_update', 'default_password_nag_edit_user', 10, 2);
    836836function default_password_nag_edit_user($user_ID, $old_data) {
    837     global $user_ID;
    838     if ( ! get_user_option('default_password_nag') ) //Short circuit it.
     837    if ( ! get_user_option('default_password_nag', $user_ID) ) //Short circuit it.
    839838        return;
    840839
     
    842841
    843842    if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed.
    844         delete_user_setting('default_password_nag');
     843        delete_user_setting('default_password_nag', $user_ID);
    845844        update_user_option($user_ID, 'default_password_nag', false, true);
    846845    }
Note: See TracChangeset for help on using the changeset viewer.