From 50b197cf94afaffb68fd3c865b22c49a4eaf3f39 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@14608 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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); } }