1
beyond_
Re: Autologin - does it update xoopsmembers "last login date"
  • 2003/7/17 14:04

  • beyond_

  • Just popping in

  • Posts: 1

  • Since: 2003/6/8 1


Hi Double1,

I just installed this hack and it doesn't update the "last Login Date" on the xoopsmembers module either.

If you don't mind that 'last login date' actually shows 'last seen date' you can do the following:

Insert code after line 49 ($online_handler->write($uid, $uname, time(),...) in modules/system/blocks/system_blocks.php.

// Update last_login xoops_users-table
$sql "SELECT count(*) FROM ".$xoopsDB->prefix("users")." WHERE uid=".$uid."";
$result $xoopsDB->query($sql);
list(
$getRowsNum) = $xoopsDB->fetchRow($result);

if ( 
$getRowsNum 0) {
   
$sql "UPDATE ".$xoopsDB->prefix("users")." SET last_login = " time() . " WHERE uid=".$uid."";

   
$xoopsDB->queryF($sql);
}
// End update last_login xoops_users-table


Also add $xoopsDB to the globals in line 34 so it reads:
global $xoopsDB$xoopsConfig$xoopsUser$xoopsModule$HTTP_SERVER_VARS;


Good luck,
Inge




TopTop



Login

Who's Online

169 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits