fix login access

parent 0fa4bc02
...@@ -68,20 +68,17 @@ class SiteController extends Controller ...@@ -68,20 +68,17 @@ 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', [
'model' => $model,
]);
} }
return $this->render('login', [
'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