Don't allow Twitter registration if site is invite only

This commit is contained in:
Zach Copley 2011-09-17 14:47:35 -07:00
parent 985f52ce60
commit 6c43967e8c

View File

@ -385,6 +385,8 @@ class TwitterauthorizationAction extends Action
$this->hidden('tw_fields_screen_name', $this->tw_fields['screen_name']); $this->hidden('tw_fields_screen_name', $this->tw_fields['screen_name']);
$this->hidden('tw_fields_name', $this->tw_fields['fullname']); $this->hidden('tw_fields_name', $this->tw_fields['fullname']);
// Don't allow new account creation if site is flagged as invite only
if (common_config('site', 'inviteonly') == false) {
$this->elementStart('fieldset'); $this->elementStart('fieldset');
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('legend', null, $this->element('legend', null,
@ -420,6 +422,7 @@ class TwitterauthorizationAction extends Action
// TRANS: Button text for creating a new StatusNet account in the Twitter connect page. // TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
$this->submit('create', _m('BUTTON','Create')); $this->submit('create', _m('BUTTON','Create'));
$this->elementEnd('fieldset'); $this->elementEnd('fieldset');
}
$this->elementStart('fieldset'); $this->elementStart('fieldset');
$this->element('legend', null, $this->element('legend', null,