Skip to content

Commit

Permalink
Merge branch 'MDL-73421-master' of https://github.com/marinaglancy/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Sep 27, 2022
2 parents 8a8f009 + 741b357 commit 182649d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function process_log($data, bool $jsonformat = false) {
// There is no need to roll dates. Logs are supposed to be immutable. See MDL-44961.

// Revert other to its original php way.
$data->other = \tool_log\helper\reader::decode_other(base64_decode($data->other));
$data->other = \tool_log\local\privacy\helper::decode_other(base64_decode($data->other));

// Arrived here, we have both 'objectid' and 'other' to be converted. This is the tricky part.
// Both are pointing to other records id, but the sources are not identified in the
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/log/classes/local/privacy/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static function transform_standard_log_record_for_userid($record, $userid
} else {
$name = $record->eventname;
$description = "Unknown event ({$name})";
$other = \tool_log\helper\reader::decode_other($record->other);
$other = self::decode_other($record->other);
}

$realuserid = $record->realuserid;
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/task/send_failed_login_notifications_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function execute() {
$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 = \tool_log\helper\reader::decode_other($log->other);
$other = \tool_log\local\privacy\helper::decode_other($log->other);
$a->info = empty($other['username']) ? '' : $other['username'];
$a->name = get_string('unknownuser');
} else {
Expand Down

0 comments on commit 182649d

Please sign in to comment.