fix login access

parent 0fa4bc02
...@@ -68,21 +68,18 @@ class SiteController extends Controller ...@@ -68,21 +68,18 @@ class SiteController extends Controller
if($model->user->role == User::ROLE_ADMIN) if($model->user->role == User::ROLE_ADMIN)
{ {
$model->login(); $model->login();
return $this->goBack();
} }
else else
{ {
return $this->refresh(); $model->addError('password', 'Вы не имеете доступ в этот раздел');
} }
return $this->goBack();
} }
else
{
return $this->render('login', [ return $this->render('login', [
'model' => $model, 'model' => $model,
]); ]);
} }
}
public function actionRecovery() public function actionRecovery()
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment