phpstan: missing service returns
This commit is contained in:
@ -52,6 +52,8 @@
|
||||
"2amigos/qrcode-library": "Needed if you want to enable 2FA with QR Code generation. Require version ^1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"2amigos/2fa-library": "^2.0",
|
||||
"2amigos/qrcode-library": "^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.3",
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"phpmd/phpmd": "@stable",
|
||||
|
||||
@ -67,6 +67,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
||||
$event = Yii::createObject(SocialNetworkAuthEvent::class, [$account, $this->client]);
|
||||
|
||||
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_BEFORE_AUTHENTICATE, $event);
|
||||
$result = false;
|
||||
|
||||
if ($account->user instanceof User) {
|
||||
if ($account->user->getIsBlocked()) {
|
||||
@ -75,12 +76,15 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
||||
} else {
|
||||
Yii::$app->user->login($account->user, $this->controller->module->rememberLoginLifespan);
|
||||
$this->authAction->setSuccessUrl(Yii::$app->getUser()->getReturnUrl());
|
||||
$result = true;
|
||||
}
|
||||
} else {
|
||||
$this->authAction->setSuccessUrl($account->getConnectionUrl());
|
||||
$result = true;
|
||||
}
|
||||
|
||||
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_AFTER_AUTHENTICATE, $event);
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function createAccount()
|
||||
|
||||
@ -65,5 +65,6 @@ class SwitchIdentityService implements ServiceInterface
|
||||
/** @var IdentityInterface $user */
|
||||
Yii::$app->user->switchIdentity($user, $session->timeout);
|
||||
$this->controller->trigger(UserEvent::EVENT_AFTER_SWITCH_IDENTITY, $event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user