Permalink
Browse files

MDL-33562 lib: remove private keys when user deleted

  • Loading branch information...
1 parent f36066f commit 4c4c90f4b086b66f0bcc955dea71b3131b0a0db3 @danpoltawski danpoltawski committed May 17, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/moodlelib.php
View
@@ -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);

0 comments on commit 4c4c90f

Please sign in to comment.