Skip to content
Permalink
Browse files
Prevent registering via POST if self registration is disabled
  • Loading branch information
ignacionelson committed Jan 5, 2022
1 parent b0a2750 commit 240d20b8a601c3d8973892eca552208fc4954e37
Showing with 6 additions and 3 deletions.
  1. +6 −3 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;
}
}
}
?>

<div class="col-xs-12 col-sm-12 col-lg-4 col-lg-offset-4">
@@ -165,7 +167,8 @@
<p><a href="<?php echo BASE_URI; ?>" target="_self"><?php _e('Go back to the homepage.','cftp_admin'); ?></a></p>
</div>
</div>
</div> <!-- main -->
</div>
</div>

<?php
include_once ADMIN_VIEWS_DIR . DS . 'footer.php';

0 comments on commit 240d20b

Please sign in to comment.