Skip to content

Commit

Permalink
fix: use private function instead of public one
Browse files Browse the repository at this point in the history
  • Loading branch information
modelrailroader committed Jan 17, 2024
1 parent e07eb52 commit 4e32aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GymMel_Alumni/src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function authenticate(string $username, string $password): bool
}
if (password_verify($password, $response[0]['password'])) {
if(password_needs_rehash($response[0]['password'], PASSWORD_DEFAULT)) {
$newPassword = password_hash($password, PASSWORD_DEFAULT);
$newPassword = $this->cryptPassword($password);
$this->setNewPassword($response[0]['userid'], $newPassword);
}

Expand All @@ -143,7 +143,7 @@ public function authenticate(string $username, string $password): bool
$this->getUserById($response[0]['userid']);
return true;
}
}
}
else {
$this->updateLoginTries($username);
return false;
Expand Down

0 comments on commit 4e32aab

Please sign in to comment.