Allow empty email

This commit is contained in:
Dennis Eichhorn 2018-07-28 20:45:46 +02:00
parent 999b60999f
commit 244e2e8d86

View File

@ -453,11 +453,11 @@ class Account implements ArrayableInterface, \JsonSerializable
*/
public function setEmail(string $email) : void
{
if (!Email::isValid($email)) {
if ($email !== '' && !Email::isValid($email)) {
throw new \InvalidArgumentException();
}
$this->email = mb_strtolower($email);
$this->email = \mb_strtolower($email);
}
/**