50
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