function handle($args) {
parent::handle($args);
- if (common_logged_in()) {
+ if (common_config('site', 'closed')) {
+ common_user_error(_('Registration not allowed.'));
+ } else if (common_logged_in()) {
common_user_error(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->try_register();
#Brought by...
#$config['site']['broughtby'] = 'Individual or Company';
#$config['site']['broughtbyurl'] = 'http://example.net/';
+#If you don't want to let users register (say, for a one-person install)
+#Crude but effective -- register everybody, then lock down
+#$config['site']['closed'] = true;
# If you want logging sent to a file instead of syslog
#$config['site']['logfile'] = '/tmp/laconica.log';
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : NULL,
'broughtby' => NULL,
'timezone' => 'UTC',
- 'broughtbyurl' => NULL),
+ 'broughtbyurl' => NULL,
+ 'closed' => false),
'syslog' =>
array('appname' => 'laconica', # for syslog
'priority' => 'debug'), # XXX: currently ignored