diff options
Diffstat (limited to 'actions/register.php')
-rw-r--r-- | actions/register.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actions/register.php b/actions/register.php index 033cf557f..dcbbbdb6a 100644 --- a/actions/register.php +++ b/actions/register.php @@ -382,6 +382,19 @@ class RegisterAction extends Action function showFormContent() { + $code = $this->trimmed('code'); + + $invite = null; + + if ($code) { + $invite = Invitation::staticGet($code); + } + + if (common_config('site', 'inviteonly') && !($code && $invite)) { + $this->clientError(_('Sorry, only invited people can register.')); + return; + } + $this->elementStart('form', array('method' => 'post', 'id' => 'form_register', 'class' => 'form_settings', |