Skip to content
Browse files

MDL-28387 logs: Log data when a user is deleted

  • Loading branch information...
1 parent c4a12af commit 20a2f7596cc47b31426bc8a56feea9dc8b5c5e99 @ankitagarwal ankitagarwal committed Feb 28, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/moodlelib.php
View
3 lib/moodlelib.php
@@ -3878,6 +3878,9 @@ function delete_user($user) {
$updateuser->timemodified = time();
$DB->update_record('user', $updateuser);
+ // Add this action to log
+ add_to_log(SITEID, 'user', 'delete', "view.php?id=$user->id", $user->firstname.' '.$user->lastname);
+
// We will update the user's timemodified, as it will be passed to the user_deleted event, which
// should know about this updated property persisted to the user's table.

0 comments on commit 20a2f75

Please sign in to comment.
Something went wrong with that request. Please try again.