From 815a37cf9afa8a9b584682d9594707fdd576f124 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 17 Sep 2014 11:18:54 +0200 Subject: [PATCH] Allowed setting e-mail to empty after activation --- src/Services/UserService.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Services/UserService.php b/src/Services/UserService.php index 95fb93c6..ff65ce9e 100644 --- a/src/Services/UserService.php +++ b/src/Services/UserService.php @@ -306,11 +306,8 @@ class UserService $this->assertNoUserWithThisEmail($user, $user->getEmailUnconfirmed()); $user->setAccountConfirmed(true); - if ($user->getEmailUnconfirmed()) - { - $user->setEmail($user->getEmailUnconfirmed()); - $user->setEmailUnconfirmed(null); - } + $user->setEmail($user->getEmailUnconfirmed()); + $user->setEmailUnconfirmed(null); return $user; }