| 24 | | if ( !wp_check_password($pass, $user->user_pass) ) { |
| 25 | | return false; |
| 26 | | } |
| 27 | | |
| 28 | | // If using old md5 password, rehash. |
| 29 | | if ( strlen($user->user_pass) <= 32 ) { |
| 30 | | $hash = wp_hash_password($pass); |
| 31 | | $bbdb->query( $bbdb->prepare( "UPDATE $bbdb->users SET user_pass = %s WHERE ID = %d", $hash, $user->ID ) ); |
| 32 | | global $bb_cache; |
| 33 | | $bb_cache->flush_one( 'user', $user->ID ); |
| 34 | | $user = bb_get_user( $user->ID ); |
| | 24 | if ( !wp_check_password($pass, $user->user_pass, $user->ID) ) { |
| | 25 | return false; |
| | 356 | |
| | 357 | // If the hash is still md5... |
| | 358 | if ( strlen($hash) <= 32 ) { |
| | 359 | $check = ( $hash == md5($password) ); |
| | 360 | if ( $check && $user_id ) { |
| | 361 | // Rehash using new hash. |
| | 362 | wp_set_password($password, $user_id); |
| | 363 | $hash = wp_hash_password($password); |
| | 364 | } |
| | 365 | |
| | 366 | return apply_filters('check_password', $check, $password, $hash, $user_id); |
| | 367 | } |