Fix when when activate terms and conditions but not allow register - refs BT#8783

1.9.x
Daniel Barreto 11 years ago
parent 31a4a4644b
commit f0c55ab567
  1. 7
      main/auth/inscription.php

@ -19,7 +19,10 @@ require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#pass1');
if (api_get_setting('allow_registration') === 'false') {
$isNotAllowedHere = api_get_setting('allow_terms_conditions') === 'false' &&
api_get_setting('allow_registration') === 'false';
if ($isNotAllowedHere) {
api_not_allowed(true,get_lang('RegistrationDisabled'));
}
@ -285,7 +288,7 @@ if (!CustomPages::enabled()) {
}
// Forbidden to self-register
if (api_get_setting('allow_registration') == 'false') {
if ($isNotAllowedHere) {
api_not_allowed(true,get_lang('RegistrationDisabled'));
}

Loading…
Cancel
Save