From ac62a44ba7d810cc1e252f34d63c7d3ccc8eeec5 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 24 Sep 2014 23:29:47 +0200 Subject: [PATCH] Fixed registering multiple users with empty e-mail --- src/Services/UserService.php | 2 ++ 1 file changed, 2 insertions(+) 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.');