mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
fix: invite preRegisterUsername limit
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
$lang_takeinvite = array
|
||||
(
|
||||
'head_invitation_failed' => "邀请失败!",
|
||||
'std_username_too_long' => "对不起,用户名过长(至多12个字符)",
|
||||
'std_must_enter_email' => "你必须输入邮箱地址!",
|
||||
'std_invalid_email_address' => "无效的邮箱地址!",
|
||||
'std_must_enter_personal_message' => "请添加信件中的私人内容。",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$lang_takeinvite = array
|
||||
(
|
||||
'head_invitation_failed' => "邀請失敗!",
|
||||
'std_username_too_long' => "對不起,用戶名過長(至多12個字元)",
|
||||
'std_must_enter_email' => "你必須輸入郵箱位址!",
|
||||
'std_invalid_email_address' => "無效的郵箱地址!",
|
||||
'std_must_enter_personal_message' => "請添加信件中的私人內容。",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$lang_takeinvite = array
|
||||
(
|
||||
'head_invitation_failed' => "Invitation failed!",
|
||||
'std_username_too_long' => "Sorry, the username is too long (up to 12 characters)",
|
||||
'std_must_enter_email' => "You must enter an email address!",
|
||||
'std_invalid_email_address' => "Invalid email address!",
|
||||
'std_must_enter_personal_message' => "Please add a personal message.",
|
||||
|
||||
@@ -21,6 +21,8 @@ $email = unesc(htmlspecialchars(trim($_POST["email"])));
|
||||
$email = safe_email($email);
|
||||
$preRegisterUsername = $_POST['pre_register_username'] ?? '';
|
||||
$isPreRegisterEmailAndUsername = get_setting("system.is_invite_pre_email_and_username") == "yes";
|
||||
if (strlen($preRegisterUsername) > 12)
|
||||
bark($lang_takeinvite['std_username_too_long']);
|
||||
if (!$email)
|
||||
bark($lang_takeinvite['std_must_enter_email']);
|
||||
if (!check_email($email))
|
||||
|
||||
Reference in New Issue
Block a user