Browse files

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

  • Loading branch information...
1 parent f24a1a7 commit eb2cbfc6d8ef5c5da8f8b94551231ce6a5c018e7 @ankitagarwal ankitagarwal committed Feb 28, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/moodlelib.php
View
3 lib/moodlelib.php
@@ -3495,6 +3495,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);
+
// notify auth plugin - do not block the delete even when plugin fails
$authplugin = get_auth_plugin($user->auth);

0 comments on commit eb2cbfc

Please sign in to comment.