Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emonitgmbh committed Jun 13, 2017
1 parent f32090d commit fdc789f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/php_user/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ public function requestResetPassword(string $email)
return false;
}
//check if a password request is not already in progress
if ($timestamp = $this->db->cell('SELECT timestamp FROM reset WHERE users_id = (SELECT id FROM users WHERE email = ?)', $email)) {
if ($timestamp = $this->db->cell('SELECT timestamp FROM reset WHERE users_id = ?', $user_id['id'])) {
if ($timestamp <= time() - 10800) {
//delete
$this->db->delete('reset', [
'users_id' => $token_db['users_id'],
'users_id' => $user_id['id'],
]);

//resend new since old one is invalid
Expand Down

0 comments on commit fdc789f

Please sign in to comment.