mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36: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;
|
$cleanregdata = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//course unpublish went ok, unregister the site now
|
//course unpublish went ok, unregister the site now
|
||||||
if ($confirm) {
|
if ($confirm) {
|
||||||
$function = 'hub_unregister_site';
|
$function = 'hub_unregister_site';
|
||||||
$params = array();
|
$params = array();
|
||||||
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
|
$serverurl = $huburl . "/local/hub/webservice/webservices.php";
|
||||||
$xmlrpcclient = new webservice_xmlrpc_client();
|
$xmlrpcclient = new webservice_xmlrpc_client();
|
||||||
try {
|
try {
|
||||||
$result = $xmlrpcclient->call($serverurl, $hub->token, $function, $params);
|
$result = $xmlrpcclient->call($serverurl, $hub->token, $function, $params);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
if (!$cleanregdata) {
|
||||||
$errormessage = $e->getMessage();
|
$errormessage = $e->getMessage();
|
||||||
$confirm = false;
|
$confirm = false;
|
||||||
$cleanregdata = 1;
|
$cleanregdata = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue