<?php

/* For license terms, see /license.txt */
/**
 * A script to test session details by user web service
 * @package chamilo.plugin.advanced_subscription
 */
/**
 * Init
 */
require_once __DIR__ . '/../config.php';
// Protect test
api_protect_admin_script();
// exit;
$plugin = AdvancedSubscriptionPlugin::create();
$hookPlugin = HookAdvancedSubscription::create();
// Get params from request (GET or POST)
$params = array();
// Init result array
$params['user_id'] = intval($_REQUEST['u']);
$params['user_field'] = 'drupal_user_id';
$params['session_id'] = intval($_REQUEST['s']);
$params['profile_completed'] = 100;
$params['is_connected'] = true;
/**
 * Copied code from WSHelperVerifyKey function
 */
/**
 * Start WSHelperVerifyKey
 */
//error_log(print_r($params,1));
 /**
  * This method will call the Hook management deleteHook to disable Hook observer from this plugin
  * @return int
  */
 public function uninstallHook()
 {
     $hookObserver = HookAdvancedSubscription::create();
     HookAdminBlock::create()->detach($hookObserver);
     HookWSRegistration::create()->detach($hookObserver);
     HookNotificationContent::create()->detach($hookObserver);
     HookNotificationTitle::create()->detach($hookObserver);
 }