WordPress.org

Make WordPress Core

Changeset 6396 for trunk/wp-login.php


Ignore:
Timestamp:
12/17/2007 06:02:45 AM (13 years ago)
Author:
ryan
Message:

wp_set_password(). see #2394

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r6389 r6396  
    185185    // Generate something random for a password...
    186186    $new_pass = wp_generate_password();
    187     $new_hash = wp_hash_password($new_pass);
    188     $wpdb->query("UPDATE $wpdb->users SET user_pass = '$new_hash', user_activation_key = '' WHERE ID = '$user->ID'");
    189     wp_cache_delete($user->ID, 'users');
     187    wp_set_password($new_pass, $user->ID);
    190188    $message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
    191189    $message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
Note: See TracChangeset for help on using the changeset viewer.