fix login access

parent 0fa4bc02
......@@ -68,21 +68,18 @@ class SiteController extends Controller
if($model->user->role == User::ROLE_ADMIN)
{
$model->login();
return $this->goBack();
}
else
{
return $this->refresh();
$model->addError('password', 'Вы не имеете доступ в этот раздел');
}
return $this->goBack();
}
else
{
return $this->render('login', [
'model' => $model,
]);
}
}
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