From 95ec65d20a1937629d0cc88cc4e483d780f6842b Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 11 Feb 2018 17:52:50 +0100 Subject: [PATCH] Public alpha, why not. --- src/Controllers/AuthController.php | 12 ------------ views/nova/auth/register.twig | 6 ------ 2 files changed, 18 deletions(-) diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index 6273ad65..26253987 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -95,28 +95,16 @@ class AuthController extends Controller public function register() { $app = Application::getInstance(); - $allowed_to_reg = $app->config->get('Testing', 'public_registration', 'bool', false) - || in_array( - IP::remote(), - explode(' ', $app->config->get('Testing', 'allow_ip_registration', 'string', '127.0.0.1 ::1')) - ); if ($_SERVER['REQUEST_METHOD'] === 'GET') { $twig = $app->templating; $twig->vars([ 'has_registrations' => $this->hasRegistrations(), - 'allowed_to_register' => $allowed_to_reg, ]); return $twig->render('auth.register'); } - if (!$allowed_to_reg) { - return [ - 'error' => "Nice try, but you'll have to wait a little longer. I appreciate your excitement though!" - ]; - } - if ($this->hasRegistrations()) { return [ 'error' => "Someone already used an account from this IP address!\r\n" diff --git a/views/nova/auth/register.twig b/views/nova/auth/register.twig index 0e49e519..86cbebf9 100644 --- a/views/nova/auth/register.twig +++ b/views/nova/auth/register.twig @@ -6,8 +6,6 @@

{% if has_registrations %} Your IP address already has an account! - {% elseif not allowed_to_register %} - You'll have to wait a little longer! {% else %} Welcome, thanks for dropping by! {% endif %} @@ -19,10 +17,6 @@

As a temporary security measure we only allow one account per IP address, this will definitely be changed in the future but for now; sorry for the possible inconvenience!

- {% elseif not allowed_to_register %} -
-

You'll be able to register once the site enter public beta!

-
{% else %}