Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [solved] last login date...  (Read 4587 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: 47843
  • 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.024 seconds with 20 queries.