fixes + add events documentation

This commit is contained in:
Antonio Ramirez
2017-06-13 00:01:30 +02:00
parent 9f4a29941c
commit 692358adb6
6 changed files with 107 additions and 8 deletions

View File

@ -64,9 +64,11 @@ class SocialNetworkAuthenticateService implements ServiceInterface
return false;
}
}
$event = Yii::createObject(SocialNetworkAuthEvent::class, [$this->client]);
$event = Yii::createObject(SocialNetworkAuthEvent::class, [$account, $this->client]);
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_BEFORE_AUTHENTICATE, $event);
if ($account->user instanceof User) {
if ($account->user->getIsBlocked()) {
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Your account has been blocked.'));