X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FFacebookBridge%2Factions%2Ffacebookfinishlogin.php;h=7b2f27474173c02153fb28b437de1a5e3b1da80e;hb=0210b765ad59ed108fb0f4b2a53ea8deca8deab3;hp=349acd7e2298630e8839c13724c07ce907449e9f;hpb=6e894c010fc0e7ddaaafa8795634d6343019aafb;p=quix0rs-gnu-social.git diff --git a/plugins/FacebookBridge/actions/facebookfinishlogin.php b/plugins/FacebookBridge/actions/facebookfinishlogin.php index 349acd7e22..7b2f274741 100644 --- a/plugins/FacebookBridge/actions/facebookfinishlogin.php +++ b/plugins/FacebookBridge/actions/facebookfinishlogin.php @@ -257,12 +257,20 @@ class FacebookfinishloginAction extends Action $this->element('p', null, _m('Create a new user with this nickname.')); $this->elementStart('ul', 'form_data'); + + // Hook point for captcha etc + Event::handle('StartRegistrationFormData', array($this)); + $this->elementStart('li'); // TRANS: Field label. $this->input('newname', _m('New nickname'), ($this->username) ? $this->username : '', _m('1-64 lowercase letters or numbers, no punctuation or spaces')); $this->elementEnd('li'); + + // Hook point for captcha etc + Event::handle('EndRegistrationFormData', array($this)); + $this->elementEnd('ul'); // TRANS: Submit button. $this->submit('create', _m('BUTTON','Create')); @@ -299,6 +307,10 @@ class FacebookfinishloginAction extends Action function createNewUser() { + if (!Event::handle('StartRegistrationTry', array($this))) { + return; + } + if (common_config('site', 'closed')) { // TRANS: Client error trying to register with registrations not allowed. $this->clientError(_m('Registration not allowed.')); @@ -389,6 +401,8 @@ class FacebookfinishloginAction extends Action __FILE__ ); + Event::handle('EndRegistrationTry', array($this)); + $this->goHome($user->nickname); }