/** * Disable account */ public function unsetActiveAsyncAction() { // No need to render $this->_helper->viewRenderer->setNoRender(); // Create json object $json = new stdClass(); $json->error = 0; $json->message = ""; // The entire process try { // Get parameters $id = $this->_getParam("id"); // Create instance and insert user $users = new OneLogin_Acl_Users(); $users->unsetActive($id); $json->message = "User updated"; } catch (Exception $e) { $json->error = 1; $json->message = str_replace("'", '', trim($e->getMessage())); } echo $this->_helper->json($json); // Send response }