php-mpos/public/include/pages/register.inc.php
Sebastian Grewe 7390ca38e5 Enable or Disable maintenance and registrations
This will allow any admin to enable or disable a pool maintenance mode.
Regular users that are still logged in will not be kicked out (yet). New
users that are trying to login and are not admins will be denied access.

Also added registration option to Admin Settings via WebUI. You can now
disable new accounts via web option or configuration setting.

Fixes #259 but also adds an additional feature.
2013-06-30 12:03:46 +02:00

18 lines
641 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
if (!$config['website']['registration'] || !$setting->getValue('registration')) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Account registration is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
$smarty->assign("CONTENT", "disabled.tpl");
} else {
if ($config['recaptcha']['enabled']) {
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
$smarty->assign("RECAPTCHA", recaptcha_get_html($config['recaptcha']['public_key']));
}
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
}
?>