diff --git a/src/models/User.php b/src/models/User.php index a61706b..306619d 100644 --- a/src/models/User.php +++ b/src/models/User.php @@ -217,7 +217,7 @@ public static function getUserIdByEmail(string $email): ?int $query = "SELECT user_id FROM user WHERE email = :email"; $result = self::query($query, ['email' => $email]); - if (!$result || count($result) == 0) { + if (empty($result)) { return null; } return $result[0]->user_id;