We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 6c43967e authored by Zach Copley's avatar Zach Copley

Don't allow Twitter registration if site is invite only

parent 985f52ce
...@@ -385,41 +385,44 @@ class TwitterauthorizationAction extends Action ...@@ -385,41 +385,44 @@ 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']);
$this->elementStart('fieldset'); // Don't allow new account creation if site is flagged as invite only
$this->hidden('token', common_session_token()); if (common_config('site', 'inviteonly') == false) {
$this->element('legend', null, $this->elementStart('fieldset');
// TRANS: Fieldset legend. $this->hidden('token', common_session_token());
_m('Create new account')); $this->element('legend', null,
$this->element('p', null, // TRANS: Fieldset legend.
// TRANS: Sub form introduction text. _m('Create new account'));
_m('Create a new user with this nickname.')); $this->element('p', null,
$this->elementStart('ul', 'form_data'); // TRANS: Sub form introduction text.
_m('Create a new user with this nickname.'));
// Hook point for captcha etc $this->elementStart('ul', 'form_data');
Event::handle('StartRegistrationFormData', array($this));
// Hook point for captcha etc
$this->elementStart('li'); Event::handle('StartRegistrationFormData', array($this));
// TRANS: Field label.
$this->input('newname', _m('New nickname'), $this->elementStart('li');
($this->username) ? $this->username : '', // TRANS: Field label.
// TRANS: Field title for nickname field. $this->input('newname', _m('New nickname'),
_m('1-64 lowercase letters or numbers, no punctuation or spaces.')); ($this->username) ? $this->username : '',
$this->elementEnd('li'); // TRANS: Field title for nickname field.
$this->elementStart('li'); _m('1-64 lowercase letters or numbers, no punctuation or spaces.'));
// TRANS: Field label. $this->elementEnd('li');
$this->input('email', _m('LABEL','Email'), $this->getEmail(), $this->elementStart('li');
// TRANS: Field title for e-mail address field. // TRANS: Field label.
_m('Used only for updates, announcements, '. $this->input('email', _m('LABEL','Email'), $this->getEmail(),
'and password recovery')); // TRANS: Field title for e-mail address field.
$this->elementEnd('li'); _m('Used only for updates, announcements, '.
'and password recovery'));
// Hook point for captcha etc $this->elementEnd('li');
Event::handle('EndRegistrationFormData', array($this));
// Hook point for captcha etc
$this->elementEnd('ul'); Event::handle('EndRegistrationFormData', array($this));
// TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
$this->submit('create', _m('BUTTON','Create')); $this->elementEnd('ul');
$this->elementEnd('fieldset'); // TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
$this->submit('create', _m('BUTTON','Create'));
$this->elementEnd('fieldset');
}
$this->elementStart('fieldset'); $this->elementStart('fieldset');
$this->element('legend', null, $this->element('legend', null,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment