1

Topic: Last Visited or Logged in

I don't recall ever seeing this as a feature anywhere, but curious if anyone has ever had use for it or done anything about it.  I find that it would be very handy to know when the last time someone logged in to the site was. Might make it easier for user management and try to weed out the ones that are inactive users.  I have some users that log on almost daily, but post almost never and I would hate to delete those people.

Any way to find out when the last time someone logged in was?

2 (edited by niksy 2006-12-11 09:32)

Re: Last Visited or Logged in

Yes, I'm also looking for this. I would like to have this section in every profile. I tried using mod http://www.punres.org/desc.php?pid=296 on profile.php, but with no results sad. Any ideas?

Re: Last Visited or Logged in

I've edited profile.php. Add `u.last_visit` to the database query (line 894)?

g.g_user_title FROM '.$db->prefix.'users
g.g_user_title, u.last_visit FROM '.$db->prefix.'users

?then display it (line 1197):

<p><?php echo $lang_common['Last post'] ?>: <?php echo $last_post ?></p>
<?php if ($pun_user['g_id'] == PUN_ADMIN): ?><p>Last visit: <?php echo format_time($user['last_visit']); ?>
<?php endif; ?><p><?php echo $lang_common['Last post'] ?>: <?php echo $last_post ?></p>

4

Re: Last Visited or Logged in

Thanks man!