mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 02:28:42 +00:00
fix(user/edit): allow empty email
This commit is contained in:
parent
0298f95726
commit
40c4ab5c07
@ -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 格式不合法。';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user