protected function prepareUser() { if (!($id = \Components\Session::getSession('user_id'))) { exit(header('Location: /account/authorize')); } $user = new \App\Models\User(); $this->user = $user->initRel(['country', 'group'])->findByPk($id)->getValuesAllField(); $this->setVar('user', $this->user); }