public function activateAction() { if ($this->getRequest()->isPost()) { $data = $this->_helper->requestData(); $passw = $data['password']; $this->_userSrv->activate($passw); $this->view->result = true; } else { throw new ForbiddenException("Activate action must be a post request"); } }
public function testActivate() { // Persist user $this->_user->save(); $oldPwd = $this->_user->password; $user_id = $this->_service->activate('Unrepeated' . rand(1000, 9999)); $this->assertNotEmpty($user_id); }