mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-26 18:21:30 +01:00
Clear user cache when the password is reset.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f33dda4dd2
commit
e2e74cf4b9
@ -138,6 +138,8 @@ case 'resetpass' :
|
||||
|
||||
$new_pass = substr( md5( uniqid( microtime() ) ), 0, 7);
|
||||
$wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
|
||||
wp_cache_delete($users->ID, 'users');
|
||||
wp_cache_delete($users->user_login, 'userlogins');
|
||||
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
|
||||
$message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
|
||||
$message .= get_settings('siteurl') . "/wp-login.php\r\n";
|
||||
|
Loading…
Reference in New Issue
Block a user