Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-33562 lib: remove private keys when user deleted

  • Loading branch information...
commit 4c4c90f4b086b66f0bcc955dea71b3131b0a0db3 1 parent f36066f
@danpoltawski danpoltawski authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/moodlelib.php
View
3  lib/moodlelib.php
@@ -4078,6 +4078,9 @@ function delete_user(stdClass $user) {
// unauthorise the user for all services
$DB->delete_records('external_services_users', array('userid'=>$user->id));
+ // Remove users private keys.
+ $DB->delete_records('user_private_key', array('userid' => $user->id));
+
// force logout - may fail if file based sessions used, sorry
session_kill_user($user->id);
Please sign in to comment.
Something went wrong with that request. Please try again.