MyBB Community Forums

Full Version: Membership List(s): Last Visit / Active time may be incorrect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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;
 }
 }
MyBB devs, feedback?
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3669

Thanks for contributing to MyBB!

Regards,
The MyBB Group