示例#1
0
 public function changePasswordAction()
 {
     if (Request::isPost()) {
         $password = $_POST['password'];
         $cpassword = $_POST['cpassword'];
         try {
             AuthModel::changePassword($password, $cpassword);
         } catch (SiteException $ex) {
             $this->errors = $ex->getErrors();
             $this->view('change_password');
             return;
         }
         $this->message = 'Change Password Success!';
     }
     $this->view('change_password');
 }