Permalink
Browse files

MDL-43797 lib/moodlelib.php: Remove custom homepages on user deletion

Change-Id: I43359a630c0b668ed3312828c15acc9cc220e49b
  • Loading branch information...
1 parent b88bb98 commit ee7d0bbfcfa2cb990ea7c8d1399f9e8ff63c8f01 @DavidCurry DavidCurry committed Jan 22, 2014
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/moodlelib.php
View
@@ -4233,6 +4233,9 @@ function delete_user(stdClass $user) {
// Remove users private keys.
$DB->delete_records('user_private_key', array('userid' => $user->id));
+ // Remove users customised pages.
+ $DB->delete_records('my_pages', array('userid' => $user->id, 'private' => 1));
+
// Force logout - may fail if file based sessions used, sorry.
\core\session\manager::kill_user_sessions($user->id);

0 comments on commit ee7d0bb

Please sign in to comment.