Example #1
0
 public function changeAvatarAction()
 {
     $this->__initStatic();
     if ($this->request->isPost()) {
         $user_id = $this->request->getPost('user_id');
         $avatar_url = $this->request->getPost('avatar_url');
         $user_basic = new DtbUserBasic();
         $result = $user_basic->changeAvatar($user_id, $avatar_url);
         if ($result) {
             $this->flash->success('修改成功');
             return $this->dispatcher->forward(array('controller' => 'User', 'action' => 'center'));
         } else {
             $this->flash->error('修改失败');
         }
     }
     $this->view->setVar('is_current', changemail);
 }