Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Membership List(s): Last Visit / Active time may be incorrect
#1
The Last Visit / Last Active time may be incorrect and shown as "1 minute ago" for users who have registered but then never logged in.

MyBB Version 1.8.20
PHP Version 7.1.28
SQL Engine MySQLi 5.6.43

Suggested fixes:
In users.php
at line 3583
// $user['view']['lastactive'] = my_date('relative', $user['lastactive']); (LFG) 04-16-2019
 if($user['lastactive'])
{
$user['view']['lastactive'] = my_date('relative', $user['lastactive']);
}
else
{
$user['view']['lastactive'] = $lang->never;
}

In memberlist.php
at line 486
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])
 {
 $user['lastvisit'] = $lang->lastvisit_never;

 if($user['lastvisit'])
 {
 // We have had at least some active time, hide it instead
 $user['lastvisit'] = $lang->lastvisit_hidden;
 }
 }
 else
 {
 if($user['lastvisit'])
 {
 $user['lastvisit'] = my_date('relative', $user['lastactive']);
 }
 else
 {
 $user['lastvisit'] = $lang->lastvisit_never;
 }
 }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)