mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
sent invite check pre username if exists
This commit is contained in:
@@ -35,8 +35,14 @@ $body = str_replace("<br />", "<br />", nl2br(trim(strip_tags($_POST["body"]))))
|
||||
if(!$body)
|
||||
bark($lang_takeinvite['std_must_enter_personal_message']);
|
||||
|
||||
if ($isPreRegisterEmailAndUsername && empty($preRegisterUsername)) {
|
||||
bark(nexus_trans("invite.require_pre_register_username"));
|
||||
if ($isPreRegisterEmailAndUsername) {
|
||||
if (empty($preRegisterUsername)) {
|
||||
bark(nexus_trans("invite.require_pre_register_username"));
|
||||
}
|
||||
$exists = \App\Models\User::query()->where('username', $preRegisterUsername)->exists();
|
||||
if ($exists) {
|
||||
bark(nexus_trans("user.username_already_exists", ["username" => $preRegisterUsername]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,4 +54,5 @@ return [
|
||||
'body' => 'You had been :action to :new_class, administrator: :operator, reason: :reason.',
|
||||
],
|
||||
],
|
||||
'username_already_exists' => 'Username::username already exists',
|
||||
];
|
||||
|
||||
@@ -54,4 +54,5 @@ return [
|
||||
'body' => '你被:action为:new_class,管理员::operator, 原因::reason。',
|
||||
],
|
||||
],
|
||||
'username_already_exists' => '用户名::username 已经存在',
|
||||
];
|
||||
|
||||
@@ -54,4 +54,5 @@ return [
|
||||
'body' => '你被:action為:new_class,管理員::operator, 原因::reason。',
|
||||
],
|
||||
],
|
||||
'username_already_exists' => '用戶名::username 已經存在',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user