/** * Get Agent List */ public function action_get_agent_list() { // API headers Controller_Helper_Header::api_headers($this->response); if (HTTP_Request::GET == $this->request->method()) { //$data = json_decode(file_get_contents('php://input'), TRUE); $response = Controller_Api_Admin::get_agent_list(); $this->response->headers('Content-Type', 'application/json'); echo json_encode($response); } $this->auto_render = FALSE; }
/** * Resend User Registration Code */ public function action_resend_registration_code() { // API headers Controller_Helper_Header::api_headers($this->response); if (HTTP_Request::POST == $this->request->method()) { $data = json_decode(file_get_contents('php://input'), TRUE); $response = Controller_Api_User::resend_user_registration_code($data); $this->response->headers('Content-Type', 'application/json'); echo json_encode($response); } $this->auto_render = FALSE; }