debug print
This commit is contained in:
parent
0b7a8c0252
commit
e37bfdd291
@ -4,6 +4,7 @@ require_once "lib/account.php";
|
||||
|
||||
function endpoint($endpoint_data): array
|
||||
{
|
||||
print_r($endpoint_data);
|
||||
|
||||
return match ($endpoint_data["action"]) {
|
||||
//not logged in start
|
||||
|
@ -83,7 +83,7 @@ function verifyPassword($userID, $password): bool
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return !empty($password_hash) && password_verify($password, $password_hash);
|
||||
return !empty($password_hash) && !empty($password) && password_verify($password, $password_hash);
|
||||
}
|
||||
|
||||
function doLogin($email, $password): array
|
||||
@ -108,7 +108,7 @@ function doLogin($email, $password): array
|
||||
|
||||
if ($stmt->num_rows() > 0) {
|
||||
$stmt->fetch();
|
||||
if (password_verify($password, $password_hash) && $privilege_level >= $routerConfig["logged_in_default_permission_level"]) {
|
||||
if (password_verify($password, $password_hash)) {
|
||||
$found = true;
|
||||
|
||||
// Update LastLoginAt and LoginCount
|
||||
|
Loading…
Reference in New Issue
Block a user