|
@@ -19,7 +19,12 @@ 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') {
|
|
|
+// User is not allowed if Terms and Conditions are disabled and
|
|
|
+// registration is disabled too.
|
|
|
+$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 +290,7 @@ if (!CustomPages::enabled()) {
|
|
|
}
|
|
|
|
|
|
// Forbidden to self-register
|
|
|
- if (api_get_setting('allow_registration') == 'false') {
|
|
|
+ if ($isNotAllowedHere) {
|
|
|
api_not_allowed(true,get_lang('RegistrationDisabled'));
|
|
|
}
|
|
|
|