Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [solved] last login date...  (Read 3203 times)

0 Members and 1 Guest are viewing this topic.

Sebbit

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • PITA - stunt page
[solved] last login date...
« on: August 13, 2004, 04:22:33 am »

The last login date in the user list only changes when the user was logged out before.
But if a user stays always logged in via cookie, the date never changes...
So, how is it possible to show the date of the last VISIT instead of the last login?
« Last Edit: August 14, 2004, 12:09:33 am by Sebbit »
Logged

Nibbler

  • Guest
Re: last login date...
« Reply #1 on: August 13, 2004, 12:31:51 pm »

Just a matter of adding a query into the bottom of your init.inc.php file

Code: [Select]
if (USER_ID) db_query("UPDATE {$CONFIG['TABLE_USERS']} SET user_lastvisit = NOW() WHERE user_id= '$user_id'");
Logged

Sebbit

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
    • PITA - stunt page
Re: last login date...
« Reply #2 on: August 14, 2004, 12:09:03 am »

thanks!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: [solved] last login date...
« Reply #3 on: August 14, 2004, 06:51:58 pm »

@Nibbler and dev team: should we add this to the core code?

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.