Skip to content

Commit 7b6aa48

Browse files
authored
Merge pull request #2590 from RaJiska/master
Pin attempts not reset upon success fix
2 parents 86ad302 + 615d6c4 commit 7b6aa48

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/classes/user.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ public function checkPin($userId, $pin='') {
292292
count($aPin) == 1 ? $pin_hash = $this->getHash($pin, 0) : $pin_hash = $this->getHash($pin, $aPin[1], $aPin[2]);
293293
$stmt = $this->mysqli->prepare("SELECT pin FROM $this->table WHERE id = ? AND pin = ? LIMIT 1");
294294
if ($stmt->bind_param('is', $userId, $pin_hash) && $stmt->execute() && $stmt->bind_result($row_pin) && $stmt->fetch()) {
295+
$stmt->close();
295296
$this->setUserPinFailed($userId, 0);
296297
return ($pin_hash === $row_pin);
297298
}

0 commit comments

Comments
 (0)