File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public function findResetPasswordByHash(?string $hash): UserResetPassword
198198 public function findByEmail (string $ email ): User
199199 {
200200 $ user = $ this ->userDetailRepository ->findOneBy (['email ' => $ email ])?->getUser();
201- if (! $ user instanceof User) {
201+ if (! $ user instanceof User || $ user -> isDeleted () ) {
202202 throw new NotFoundException (Message::USER_NOT_FOUND );
203203 }
204204
@@ -219,7 +219,7 @@ public function findByIdentity(string $identity): ?User
219219 public function findOneBy (array $ params = []): User
220220 {
221221 $ user = $ this ->userRepository ->findOneBy ($ params );
222- if (! $ user instanceof User || $ user ->getStatus () === UserStatusEnum::Deleted ) {
222+ if (! $ user instanceof User || $ user ->isDeleted () ) {
223223 throw new NotFoundException (Message::USER_NOT_FOUND );
224224 }
225225
You can’t perform that action at this time.
0 commit comments