예제 #1
0
 /**
  * [edit description] 用户个人信息修改
  * @Author   alanfang2012@163.com
  * @DateTime 2015-09-01T22:23:00+0800
  */
 public function edit()
 {
     if (!empty($_POST)) {
         $_POST['user_id'] = session('user_id');
         $_POST['user_name'] = session('user_name');
         $user_mod = new \Model\UserModel();
         $res = $user_mod->create();
         if ($res) {
             $z = $user_mod->save();
             if ($z) {
                 $this->redirect('user/info');
             }
             $this->redirect('user/info');
         }
     }
     $this->assign('user_id', session('user_id'));
     $this->assign('user_name', session('user_name'));
     $this->display();
 }