summaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-24 19:55:08 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-24 19:55:08 -0400
commite97c06e8e27b4dce977a493a47c216d6c5796c2e (patch)
treed5050b232631d91ed1cd56382b0fac402c7a5f1f /actions/register.php
parent3a262a3bcd0c794f12d97b28be33b1c262063718 (diff)
let admins prevent registration
darcs-hash:20080724235508-84dde-8bac4d9dd772adb9f27d083b3d0b6ed5b7526dbf.gz
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/register.php b/actions/register.php
index 6ac283059..d97e3a18a 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -24,7 +24,9 @@ class RegisterAction extends Action {
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();