mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Simplify setting names and check
This commit is contained in:
@@ -151,7 +151,7 @@ class RegisterController extends Controller
|
||||
return $this->showRegistrationForm($request, $error);
|
||||
}
|
||||
|
||||
if (Invite::isAllowed($inviteCode, $email) || Settings::settingValue('..registerstatus') !== Settings::REGISTER_STATUS_INVITE) {
|
||||
if (Invite::isAllowed($inviteCode, $email) || Settings::settingValue('registerstatus') !== Settings::REGISTER_STATUS_INVITE) {
|
||||
$user = $this->create(
|
||||
[
|
||||
'username' => $userName,
|
||||
@@ -201,7 +201,7 @@ class RegisterController extends Controller
|
||||
$this->inviteCodeQuery = '&invitecode='.$inviteCode;
|
||||
}
|
||||
|
||||
if ((int) Settings::settingValue('..registerstatus') === Settings::REGISTER_STATUS_INVITE) {
|
||||
if ((int) Settings::settingValue('registerstatus') === Settings::REGISTER_STATUS_INVITE) {
|
||||
if (! empty($inviteCode)) {
|
||||
if (Invite::isValid($inviteCode)) {
|
||||
$error = '';
|
||||
@@ -214,7 +214,7 @@ class RegisterController extends Controller
|
||||
$error = 'Registrations are currently invite only.';
|
||||
$showRegister = 0;
|
||||
}
|
||||
} elseif ((int) Settings::settingValue('..registerstatus') === Settings::REGISTER_STATUS_CLOSED) {
|
||||
} elseif ((int) Settings::settingValue('registerstatus') === Settings::REGISTER_STATUS_CLOSED) {
|
||||
$error = 'Registrations are currently closed.';
|
||||
$showRegister = 0;
|
||||
} elseif ($request->has('invitecode')) {
|
||||
|
||||
Reference in New Issue
Block a user