Permalink
Browse files

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

Change-Id: Ibaf6f0a9dc29d00b97a32111d1cf5063ebed1888
  • Loading branch information...
1 parent 9788e26 commit 72d1ccffb3b9e49e7bdb71a92dcf7187126041fc @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 72d1ccf

Please sign in to comment.