mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
unregistration MDL-22956 force unregistration/clean data try a last chance ws call (even though it should also fail) to unregister from the hub. This is implemented in case a site admin recieved a spam email and did "naively" the unregistration.
This commit is contained in:
parent
bd40069f4d
commit
5bfbe04e24
1 changed files with 11 additions and 9 deletions
|
@ -100,16 +100,18 @@ if (empty($cancel) and $unregistration and $confirm and confirm_sesskey()) {
|
|||
$cleanregdata = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//course unpublish went ok, unregister the site now
|
||||
if ($confirm) {
|
||||
$function = 'hub_unregister_site';
|
||||
$params = array();
|
||||
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
|
||||
$xmlrpcclient = new webservice_xmlrpc_client();
|
||||
try {
|
||||
$result = $xmlrpcclient->call($serverurl, $hub->token, $function, $params);
|
||||
} catch (Exception $e) {
|
||||
//course unpublish went ok, unregister the site now
|
||||
if ($confirm) {
|
||||
$function = 'hub_unregister_site';
|
||||
$params = array();
|
||||
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
|
||||
$xmlrpcclient = new webservice_xmlrpc_client();
|
||||
try {
|
||||
$result = $xmlrpcclient->call($serverurl, $hub->token, $function, $params);
|
||||
} catch (Exception $e) {
|
||||
if (!$cleanregdata) {
|
||||
$errormessage = $e->getMessage();
|
||||
$confirm = false;
|
||||
$cleanregdata = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue