Make WordPress Core


Ignore:
Timestamp:
03/06/2009 04:27:51 AM (15 years ago)
Author:
ryan
Message:

Use wpdb::insert() and update(). Props DD32. see #6836

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r10691 r10730  
    14591459
    14601460    $hash = wp_hash_password($password);
    1461     $query = $wpdb->prepare("UPDATE $wpdb->users SET user_pass = %s, user_activation_key = '' WHERE ID = %d", $hash, $user_id);
    1462     $wpdb->query($query);
     1461    $wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
     1462
    14631463    wp_cache_delete($user_id, 'users');
    14641464}
Note: See TracChangeset for help on using the changeset viewer.