fix routing bug

This commit is contained in:
Antonio Ramirez
2017-08-06 15:27:07 +02:00
parent f5785e208b
commit 031e514e2f

View File

@ -51,7 +51,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
$account = $this->socialNetworkAccountQuery->whereClient($this->client)->one();
if (!$this->controller->module->enableRegistration && ($account === null || $account->user === null)) {
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Registration on this website is disabled'));
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
return false;
}
@ -59,7 +59,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
$account = $this->createAccount();
if (!$account) {
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Unable to create an account.'));
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
return false;
}