diff --git a/src/Services/UserService.php b/src/Services/UserService.php index 49b61822..50f6084a 100644 --- a/src/Services/UserService.php +++ b/src/Services/UserService.php @@ -304,6 +304,8 @@ class UserService private function assertNoUserWithThisEmail(\Szurubooru\Entities\User $owner, $emailToCheck) { + if (!$emailToCheck) + return; $userWithThisEmail = $this->userDao->findByEmail($emailToCheck); if ($userWithThisEmail and $userWithThisEmail->getId() !== $owner->getId()) throw new \DomainException('User with this e-mail already exists.');