Changeset 12983
- Timestamp:
- 02/06/2010 06:20:38 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/upgrade.php
r12947 r12983 65 65 $message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.'); 66 66 $user_id = wp_create_user($user_name, $random_password, $user_email); 67 update_user meta($user_id, 'default_password_nag', true);67 update_user_option($user_id, 'default_password_nag', true, true); 68 68 } else { 69 69 $random_password = ''; -
trunk/wp-admin/includes/user.php
r12766 r12983 808 808 function default_password_nag_handler($errors = false) { 809 809 global $user_ID; 810 if ( ! get_user meta($user_ID,'default_password_nag') ) //Short circuit it.810 if ( ! get_user_option('default_password_nag') ) //Short circuit it. 811 811 return; 812 812 … … 814 814 if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 815 815 delete_user_setting('default_password_nag'); 816 update_user meta($user_ID, 'default_password_nag', false);816 update_user_option($user_ID, 'default_password_nag', false, true); 817 817 } 818 818 } … … 821 821 function default_password_nag_edit_user($user_ID, $old_data) { 822 822 global $user_ID; 823 if ( ! get_user meta($user_ID,'default_password_nag') ) //Short circuit it.823 if ( ! get_user_option('default_password_nag') ) //Short circuit it. 824 824 return; 825 825 … … 828 828 if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed. 829 829 delete_user_setting('default_password_nag'); 830 update_user meta($user_ID, 'default_password_nag', false);830 update_user_option($user_ID, 'default_password_nag', false, true); 831 831 } 832 832 } … … 834 834 add_action('admin_notices', 'default_password_nag'); 835 835 function default_password_nag() { 836 global $user_ID; 837 if ( ! get_usermeta($user_ID, 'default_password_nag') ) 836 if ( ! get_user_option('default_password_nag') ) //Short circuit it. 838 837 return; 839 838 -
trunk/wp-login.php
r12981 r12983 243 243 244 244 wp_set_password($new_pass, $user->ID); 245 update_user meta($user->ID, 'default_password_nag', true); //Set up the Password change nag.245 update_user_option($user_ID, 'default_password_nag', true, true); //Set up the Password change nag. 246 246 $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; 247 247 $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
Note: See TracChangeset
for help on using the changeset viewer.