php-mpos/public/include/pages/register.inc.php
Sebastian Grewe 7f4f5cd343 Make invitations configurable via admin panel
Invitations can now be configured through admin panel settings. By
default, invitations are enabled. Invitation system is also available if
registrations are disabled. To completely remove the ability of new
users to sign up, disable both registration and invitations.

Fixes #330
2013-07-15 12:43:29 +02:00

18 lines
656 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
if ($setting->getValue('lock_registration') && !$config['accounts']['invitations']['enabled']) {
$_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");
}
?>