]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Facebook/FBConnectAuth.php
Merge branch 'master' into 0.9.x
[quix0rs-gnu-social.git] / plugins / Facebook / FBConnectAuth.php
index 84d51578f12198dd32c72f343c543e627227755f..937db56e56f9e35d355175421cdc7bd74080930f 100644 (file)
@@ -232,6 +232,10 @@ class FBConnectauthAction 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.'));
@@ -297,6 +301,8 @@ class FBConnectauthAction extends Action
         common_debug('Facebook Connect Plugin - ' .
                      "Registered new user $user->id from Facebook user $this->fbuid");
 
+        Event::handle('EndRegistrationTry', array($this));
+
         common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
                         303);
     }