Skip to content

Commit

Permalink
MDL-62257 mnetservice_enrol: minor fixes to privacy provider
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed May 10, 2018
1 parent 24a12d9 commit 34dd6c6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mnet/service/enrol/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\subsystem\provider {
\core_privacy\local\request\plugin\provider {
/**
* Returns meta data about this system.
*
Expand Down Expand Up @@ -137,9 +137,6 @@ public static function export_user_data(approved_contextlist $contextlist) {
* @param context $context The specific context to delete data for.
*/
public static function delete_data_for_all_users_in_context(\context $context) {
if (empty($context)) {
return;
}
// Sanity check that context is at the User context level.
if ($context->contextlevel == CONTEXT_USER) {
static::delete_user_data($context->instanceid);
Expand All @@ -164,7 +161,7 @@ public static function delete_data_for_user(approved_contextlist $contextlist) {
}
}
/**
* This does the deletion of user data for the auth_oauth2.
* This does the deletion of user data for the mnetservice_enrolments.
*
* @param int $userid The user ID
*/
Expand All @@ -173,4 +170,4 @@ protected static function delete_user_data(int $userid) {
// Because we only use user contexts the instance ID is the user ID.
$DB->delete_records('mnetservice_enrol_enrolments', ['userid' => $userid]);
}
}
}

0 comments on commit 34dd6c6

Please sign in to comment.