X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fregister.php;h=dcbbbdb6a6de9afb238715b7ff1cac3d78f40b7d;hb=9f079764aa945e9e126ffa41cece17bc8951fb78;hp=033cf557f8959d7ded047794425207e82a1b82ca;hpb=eec323b5b706b84039b3ead6e7ab8d4d6b666f1a;p=quix0rs-gnu-social.git diff --git a/actions/register.php b/actions/register.php index 033cf557f8..dcbbbdb6a6 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',