diff --git a/admin/tool/log/classes/local/privacy/helper.php b/admin/tool/log/classes/local/privacy/helper.php index 95c09e96b59..a90f1fc2cff 100644 --- a/admin/tool/log/classes/local/privacy/helper.php +++ b/admin/tool/log/classes/local/privacy/helper.php @@ -85,7 +85,7 @@ class helper { } else { $name = $record->eventname; $description = "Unknown event ({$name})"; - $other = unserialize($record->other); + $other = \tool_log\helper\reader::decode_other($record->other); } $realuserid = $record->realuserid; diff --git a/lib/classes/task/send_failed_login_notifications_task.php b/lib/classes/task/send_failed_login_notifications_task.php index 6f7e123c6c2..7af752e995b 100644 --- a/lib/classes/task/send_failed_login_notifications_task.php +++ b/lib/classes/task/send_failed_login_notifications_task.php @@ -145,7 +145,7 @@ class send_failed_login_notifications_task extends scheduled_task { $a->time = userdate($log->timecreated); if (empty($log->username)) { // Entries with no valid username. We get attempted username from the event's other field. - $other = unserialize($log->other); + $other = \tool_log\helper\reader::decode_other($log->other); $a->info = empty($other['username']) ? '' : $other['username']; $a->name = get_string('unknownuser'); } else {