diff --git a/application/Espo/Services/User.php b/application/Espo/Services/User.php index d3d5d97ad1..285ef08387 100644 --- a/application/Espo/Services/User.php +++ b/application/Espo/Services/User.php @@ -104,11 +104,11 @@ class User extends Record 'emailAddress' => $emailAddress ))->findOne(); - if (!$user->isActive()) { + if (empty($user)) { throw new NotFound(); } - if (empty($user)) { + if (!$user->isActive()) { throw new NotFound(); }