diff --git a/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php b/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php index a3771bee..f3bb8187 100644 --- a/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php +++ b/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php @@ -130,6 +130,10 @@ public function authenticate(AuthEvent $authEvent) $localUserProvider->setUserId($localUser->getId()) ->setProviderId($userProfile->identifier) ->setProvider($provider); + + // Trigger register.pre event + $this->getEventManager()->trigger('register.pre', $this, array('user' => $localUser, 'userProvider' => $localUserProvider, 'userProfile' => $userProfile)); + $this->getMapper()->insert($localUserProvider); // Trigger register.post event