Skip to content

Commit

Permalink
MDL-33562 lib: remove private keys when user deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed May 31, 2013
1 parent b6f8a93 commit afed7b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit afed7b6

Please sign in to comment.