Merge branch 'MDL-63867-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE

This commit is contained in:
Jun Pataleta
2018-11-09 15:30:30 +08:00
5 changed files with 58 additions and 0 deletions
@@ -74,6 +74,13 @@ class process_data_request_task extends adhoc_task {
return;
}
// If no site purpose is defined, reject requests since they cannot be processed.
if (!\tool_dataprivacy\data_registry::defaults_set()) {
api::update_request_status($requestid, api::DATAREQUEST_STATUS_REJECTED);
mtrace('No site purpose defined. Request ' . $requestid . ' rejected.');
return;
}
// Get the user details now. We might not be able to retrieve it later if it's a deletion processing.
$foruser = core_user::get_user($request->userid);