MDL-28387 logs: Log data when a user is deleted
authorAnkit Agarwal <ankit@moodle.com>
Tue, 28 Feb 2012 06:46:55 +0000 (14:46 +0800)
committerAnkit Agarwal <ankit@moodle.com>
Wed, 29 Feb 2012 06:15:59 +0000 (14:15 +0800)
lib/moodlelib.php

index 5cf9d50..aa3d3ac 100644 (file)
@@ -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.