} else {
unset_config('debug', $site->getGUID());
}
+
+ // allow new user registration?
+ if (get_input('allow_registration', FALSE)) {
+ set_config('allow_registration', TRUE, $site->getGUID());
+ } else {
+ set_config('allow_registration', FALSE, $site->getGUID());
+ }
$https_login = get_input('https_login');
if ($https_login) {
$admin = $admin[0];
}
-if (!$CONFIG->disable_registration) {
+if ($CONFIG->allow_registration) {
// For now, just try and register the user
try {
$guid = register_user($username, $password, $name, $email, false, $friend_guid, $invitecode);
set_config('view', get_input('view'), $site->getGUID());
set_config('language', get_input('language'), $site->getGUID());
set_config('default_access', get_input('default_access'), $site->getGUID());
+ set_config('allow_registration', TRUE, $site->getGUID());
$debug = get_input('debug');
if ($debug) {
--- /dev/null
+<?php
+/**
+ * Removes the Walled Garden plugin in favor of new system settings
+ */
+
+$access = elgg_set_ignore_access(TRUE);
+
+if (is_plugin_enabled('walledgarden')) {
+ disable_plugin('walledgarden');
+ set_config('allow_registration', FALSE);
+} else {
+ set_config('allow_registration', TRUE);
+}
+
+elgg_set_ignore_access($access);
// YYYYMMDD = Elgg Date
// XX = Interim incrementer
-$version = 2010040201;
+$version = 2010050701;
// Human-friendly version name
$release = '1.8-svn';
* @link http://elgg.org/
*/
-global $CONFIG;
-
$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea')) . "</label>";
$form_body .= "<br />";
$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')) . "</label><br />";
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));
$form_body .= "<div class='persistent_login'><label><input type='checkbox' name='persistent' value='true' />".elgg_echo('user:persistent')."</label></div>";
$form_body .= "<p class='loginbox'>";
-$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . "</a> | " : "";
+$form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . '</a> | ' : '';
$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
$login_url = $vars['url'];
*
*/
-if (!isloggedin()){
-
- global $CONFIG;
-
+if (!isloggedin()) {
$form_body = "<p class='loginbox'><label>" . elgg_echo('username') . "</label>" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea name'));
$form_body .= "<label>" . elgg_echo('password') . "</label>" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea'));
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <span class='remember'><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></span></p>";
$form_body .= elgg_view('login/extend');
$form_body .= "<p class='loginbox'>";
- $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
+ $form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . '</a> | ' : '';
$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
$form_body .= "<input type='hidden' name='returntoreferer' value='true' />";
$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug));
$form_body .= '</p>';
+$options = array(
+ 'options' => array(elgg_echo('installation:registration:label')),
+ 'internalname' => 'allow_registration',
+ 'value' => $vars['config']->allow_registration ? elgg_echo('installation:registration:label') : '',
+);
+$form_body .= '<p>' . elgg_echo('installation:registration:description');
+$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</p>';
+
$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
$form_body .= "<p>" . elgg_echo('installation:disableapi') . "<br />";