function user_needs_new_hash
Search API
7.x password.inc | user_needs_new_hash($account) |
6.x password.inc | user_needs_new_hash($account) |
5.x password.inc | user_needs_new_hash($account) |
File
- includes/
password.inc, line 350 - Secure password hashing functions for user authentication.
Code
function user_needs_new_hash($account) {
// Check whether this was an updated password.
if ((substr($account->password, 0, 3) != '$S$') || (strlen($account->password) != FP_HASH_LENGTH)) {
return TRUE;
}
// Ensure that $count_log2 is within set bounds.
$count_log2 = _password_enforce_log2_boundaries(variable_get('password_count_log2', FP_HASH_COUNT));
// Check whether the iteration count used differs from the standard number.
return (_password_get_count_log2($account->password) !== $count_log2);
}