From 38407f0af5fa5a3dc658b8ab365dc4665ab3d7c1 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 13 May 2010 21:08:01 +0000 Subject: [PATCH] Fix the default password nag clearer to work when an admin sets someone elses password away from the default. Fixes #12334. git-svn-id: https://develop.svn.wordpress.org/trunk@14608 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/user.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 14fb713575..7a72297534 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -834,14 +834,13 @@ function default_password_nag_handler($errors = false) { add_action('profile_update', 'default_password_nag_edit_user', 10, 2); function default_password_nag_edit_user($user_ID, $old_data) { - global $user_ID; - if ( ! get_user_option('default_password_nag') ) //Short circuit it. + if ( ! get_user_option('default_password_nag', $user_ID) ) //Short circuit it. return; $new_data = get_userdata($user_ID); if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. - delete_user_setting('default_password_nag'); + delete_user_setting('default_password_nag', $user_ID); update_user_option($user_ID, 'default_password_nag', false, true); } }