File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,13 +75,7 @@ public function __construct(
7575 */
7676 public function findByUuid (string $ uuid ): ?User
7777 {
78- $ user = $ this ->userRepository ->findByUuid ($ uuid );
79-
80- if (! $ user instanceof User || $ user ->isDeleted ()) {
81- return null ;
82- }
83-
84- return $ user ;
78+ return $ this ->userRepository ->findByUuid ($ uuid );
8579 }
8680
8781 /**
@@ -182,11 +176,11 @@ public function updateUser(User $user, array $data = []): User
182176
183177 public function deleteUser (User $ user ): User
184178 {
185- $ user ->setStatus (UserStatusEnum::Deleted);
186179 $ placeholder = $ this ->getAnonymousPlaceholder ();
187180
188181 // make user anonymous
189182 $ user
183+ ->setStatus (UserStatusEnum::Deleted)
190184 ->setIdentity ($ placeholder . $ this ->config ['userAnonymizeAppend ' ])
191185 ->getDetail ()
192186 ->setFirstName ($ placeholder )
@@ -331,13 +325,7 @@ public function findByResetPasswordHash(?string $hash): ?User
331325 return null ;
332326 }
333327
334- $ user = $ this ->userRepository ->findByResetPasswordHash ($ hash );
335-
336- if (! $ user instanceof User || $ user ->isDeleted ()) {
337- return null ;
338- }
339-
340- return $ user ;
328+ return $ this ->userRepository ->findByResetPasswordHash ($ hash );
341329 }
342330
343331 /**
You can’t perform that action at this time.
0 commit comments