fix(user/edit): allow empty email

This commit is contained in:
Baoshuo Ren 2023-02-12 21:58:50 +08:00
parent 0298f95726
commit 40c4ab5c07
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -133,7 +133,7 @@ EOD);
'label' => UOJLocale::get('email'), 'label' => UOJLocale::get('email'),
'default_value' => $user['email'] ?: '', 'default_value' => $user['email'] ?: '',
'validator_php' => function ($email, &$vdata) { 'validator_php' => function ($email, &$vdata) {
if (!validateEmail($email)) { if ($email && !validateEmail($email)) {
return 'Email 格式不合法。'; return 'Email 格式不合法。';
} }