Skip to content

Commit

Permalink
Updated date display for lastverified to handle 0 correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Peterburnett committed May 2, 2022
1 parent c10a67c commit 9a3201d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ public function active_factors() {
$timecreated = $userfactor->timecreated == '-' ? '-'
: userdate($userfactor->timecreated, get_string('strftimedatetime'));
$lastverified = $userfactor->lastverified;
if ($lastverified != '-') {
if ($lastverified == 0) {
$lastverified = '-';
} else if ($lastverified != '-') {
$lastverified = userdate($userfactor->lastverified, get_string('strftimedatetime'));
$lastverified .= '<br>';
$lastverified .= get_string('ago', 'core_message', format_time(time() - $userfactor->lastverified));
Expand Down

0 comments on commit 9a3201d

Please sign in to comment.