public function deleteAction($userId) { $response = array(); try { $user = new Models_User($userId, null); /** * Inactivate User Info */ $status = '-1'; $userId = $user->id; if ($user->id != '') { if ($user->inActivate($userId)) { $response['status'] = 'OK'; $response['error_code'] = 0; $response['user_status'] = 'Inactivated'; } } else { $response['error_code'] = '401'; $response['error_message'] = 'User Id not available'; } } catch (Exception $ex) { $response['error_code'] = '401'; $response['error_message'] = 'Bad Request'; } return json_encode($response); }