コード例 #1
0
ファイル: User.php プロジェクト: deale/dt
 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);
 }