Port PHRAS-2877

Port of PHRAS-2877 User manipulator did not allow to set a null email
Temporary Null email is used by saml plugin while creating a user.
This commit is contained in:
jygaulier
2020-01-13 14:48:53 +01:00
committed by GitHub
parent a9e8d9aae1
commit 998c751843

View File

@@ -368,7 +368,7 @@ class UserManipulator implements ManipulatorInterface
throw new InvalidArgumentException(sprintf('Email %s is not legal.', $email));
}
if (null !== $this->repository->findByEmail($email)) {
if (($email !== null) && (null !== $this->repository->findByEmail($email))) {
throw new RuntimeException(sprintf('User with email %s already exists.', $email));
}