mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 21:48:41 +00:00
Allow empty email
This commit is contained in:
parent
999b60999f
commit
244e2e8d86
|
|
@ -453,11 +453,11 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function setEmail(string $email) : void
|
public function setEmail(string $email) : void
|
||||||
{
|
{
|
||||||
if (!Email::isValid($email)) {
|
if ($email !== '' && !Email::isValid($email)) {
|
||||||
throw new \InvalidArgumentException();
|
throw new \InvalidArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->email = mb_strtolower($email);
|
$this->email = \mb_strtolower($email);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user