Changeset 11162
- Timestamp:
- 05/03/2009 05:06:29 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/upgrade.php
r11040 r11162 61 61 $random_password = wp_generate_password(); 62 62 $user_id = wp_create_user($user_name, $random_password, $user_email); 63 update_usermeta($user_id, 'default_password_nag', true); 63 64 } else { 64 65 $random_password = __('User already exists. Password inherited.'); -
trunk/wp-admin/includes/user.php
r11109 r11162 792 792 endif; 793 793 794 add_action('admin_init', 'default_password_nag_handler'); 795 function default_password_nag_handler() { 796 if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 797 global $user_ID; 798 delete_user_setting('default_password_nag'); 799 update_usermeta($user_ID, 'default_password_nag', false); 800 } 801 } 802 add_action('admin_notices', 'default_password_nag'); 803 function default_password_nag() { 804 global $user_ID; 805 if ( ! get_usermeta($user_ID, 'default_password_nag') ) 806 return; 807 808 echo '<div class="error default-password-nag"><p>'; 809 printf(__("Howdy, you're still using the auto-generated password for your account. We recommend that you change it to something you'll remember easier. Would you like to do this now?<br /> 810 <a href='%s'>Yes, Take me to my profile page</a> | <a href='%s' id='default-password-nag-no'>No Thanks, Do not remind me again.</a>"), admin_url('profile.php') . '#password', '?default_password_nag=0'); 811 echo '</p></div>'; 812 } 813 794 814 ?> -
trunk/wp-admin/js/common.dev.js
r11118 r11162 232 232 return ''; 233 233 }); 234 }); 235 $('#default-password-nag-no').click( function() { 236 setUserSetting('default_password_nag', 'hide'); 237 $('div.default-password-nag').hide(); 238 return false; 234 239 }); 235 240 }); -
trunk/wp-admin/user-edit.php
r11110 r11162 354 354 if ( $show_password_fields ) : 355 355 ?> 356 <tr >356 <tr id="password"> 357 357 <th><label for="pass1"><?php _e('New Password'); ?></label></th> 358 358 <td><input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?><br /> -
trunk/wp-login.php
r11148 r11162 180 180 $new_pass = wp_generate_password(); 181 181 wp_set_password($new_pass, $user->ID); 182 update_usermeta($user->ID, 'default_password_nag', true); //Set up the Password change nag. 182 183 $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; 183 184 $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
Note: See TracChangeset
for help on using the changeset viewer.