コード例 #1
0
 public function changePasswordAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->_helper->requestData();
         $passw = $data['password'];
         $result = $this->_userSrv->updatePasswordByLostPasswordToken($passw);
         $this->view->data = $result;
     } else {
         throw new ForbiddenException("LostPassword action must be a post request");
     }
 }
コード例 #2
0
 /**
  * @expectedException Application\Exceptions\ValidateException
  */
 public function testUpdatePasswordShouldFailWithRepeatedPassword()
 {
     $this->_service->updatePasswordByLostPasswordToken("testing1234");
     $this->_service->updatePasswordByLostPasswordToken("testing1234");
 }