Ticket #11380: 11380.diff
File 11380.diff, 1.5 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/user.php
792 792 add_action('admin_init', 'default_password_nag_handler'); 793 793 function default_password_nag_handler($errors = false) { 794 794 global $user_ID; 795 if ( ! get_usermeta($user_ID, 'default_password_nag') ) //Short circuit it.795 if ( get_usermeta($user_ID, 'default_password_nag') === array() ) //Short circuit it. 796 796 return; 797 797 798 798 //get_user_setting = JS saved UI setting. else no-js-falback code. 799 if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) {799 if ( ! get_usermeta($user_ID, 'default_password_nag') || 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 800 800 delete_user_setting('default_password_nag'); 801 update_usermeta($user_ID, 'default_password_nag', false); 801 update_usermeta($user_ID, 'default_password_nag', array()); 802 dump(get_usermeta($user_ID, 'default_password_nag')); 802 803 } 803 804 } 804 805 … … 812 813 813 814 if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. 814 815 delete_user_setting('default_password_nag'); 815 update_usermeta($user_ID, 'default_password_nag', false);816 update_usermeta($user_ID, 'default_password_nag', array()); 816 817 } 817 818 } 818 819