From 240d20b8a601c3d8973892eca552208fc4954e37 Mon Sep 17 00:00:00 2001 From: Ignacio Nelson Date: Wed, 5 Jan 2022 11:42:01 -0300 Subject: [PATCH] Prevent registering via POST if self registration is disabled --- register.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/register.php b/register.php index 0a2d69db..6185f80a 100644 --- a/register.php +++ b/register.php @@ -17,8 +17,9 @@ include_once ADMIN_VIEWS_DIR . DS . 'header-unlogged.php'; - /** The form was submitted */ - if ($_POST) { +/** The form was submitted */ +if ($_POST) { + if (get_option('clients_can_register') == '1') { /** Validate the information from the posted form. */ /** Create the user if validation is correct. */ $new_client->setType('new_client'); @@ -70,6 +71,7 @@ exit; } } +} ?>
@@ -165,7 +167,8 @@

- + +