fixes #414, deactivate auth keys on password change

This commit is contained in:
plegall
2016-02-12 20:20:12 +01:00
parent 25edfc2663
commit fbd90fa460
4 changed files with 27 additions and 0 deletions
+18
View File
@@ -1596,4 +1596,22 @@ SELECT
return create_user_auth_key($user_id, $user_status);
}
}
/**
* Deletes authentication keys
*
* @since 2.8
* @param int $user_id
* @return null
*/
function deactivate_user_auth_keys($user_id)
{
$query = '
UPDATE '.USER_AUTH_KEYS_TABLE.'
SET expired_on = NOW()
WHERE user_id = '.$user_id.'
AND expired_on > NOW()
;';
pwg_query($query);
}
?>