From 8d36816f39d607fe0d32ed3ede45923ed97939e5 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Tue, 17 Jan 2023 00:05:58 +0100 Subject: [PATCH] Do not use type comparison for isEmailInDatabase() --- Models/UserModel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Models/UserModel.php b/Models/UserModel.php index 499fe17..7c0215b 100644 --- a/Models/UserModel.php +++ b/Models/UserModel.php @@ -19,7 +19,8 @@ final class UserModel $stmt->bindParam("email", $S_email); $stmt->execute(); - return $stmt->fetch()[0] !== 0; + $count = $stmt->fetch()[0]; + return $count != 0; }