/** * delete * * @return \Phalcon\Http\ResponseInterface */ public function deleteAction() { $hash_id = $this->request->get('id', 'string', ''); $res_text = ResText::findFirst(['hash_id = :hash_id: and user_id = :user_id:', 'bind' => ['hash_id' => $hash_id, 'user_id' => $this->current_user->id]]); if ($res_text) { $res_text->delete(); // active UserActive::record('text-delete', $this->current_user->id); } return $this->response->redirect('text/lists'); }