public function denyApplicationAction() { if ($this->request->isPost()) { $user = $this->getAuth(); $app = Application::findFirst(array('conditions' => 'id = ?1', 'bind' => array(1 => $this->request->getPost('id')))); $app->confirmed = 2; $app->manager = $user['user_id']; $app->save(); $this->response->redirect('/manageApplications'); } }