Nice module!
Minor issue: Whenever user 'update' is invoked, password_reset_user is blindly updating 'password_reset_users' even if the 'password_reset' array is not set, which is overwriting any previously saved challenge responses with a qid=0 and answer=NULL. This causes conflicts with other modules that might be performing user updates outside of the default edit profile.
Case with new isset:
case 'update':
if (isset($edit['password_reset']['question'])) {
$qid = $edit['password_reset']['question'];
$answer = trim($edit['password_reset']['answer']);
unset($edit['password_reset']);
// MySQL-only query.
db_query("REPLACE INTO {password_reset_users} (uid, qid, answer) VALUES (%d, %d, '%s')", $account->uid, $qid, $answer);
}
break;
Comments
Comment #1
Zen commentedI suspect that this is a dupe of http://drupal.org/node/246843 . Please reopen if necessary.
Thanks.