Changeset 1400

Show
Ignore:
Timestamp:
04/03/08 14:46:19 (2 years ago)
Author:
sambauers
Message:

Add missing wp_set_password() to pluggable.php

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.8/bb-includes/pluggable.php

    r1396 r1400  
    535535         
    536536        return @mail($to, $subject, $message, $headers); 
     537} 
     538endif; 
     539 
     540if ( !function_exists('wp_set_password') ) : 
     541function wp_set_password( $password, $user_id ) { 
     542        global $bbdb, $bb_cache; 
     543 
     544        $hash = wp_hash_password($password); 
     545        $query = $bbdb->prepare("UPDATE $bbdb->users SET user_pass = %s WHERE ID = %d", $hash, $user_id); 
     546        $bbdb->query($query); 
     547        $bb_cache->flush_one( 'user', $user_id ); 
    537548} 
    538549endif;