2
If you want to create a simple log of users connections, try this (for XOOPS 2.0.18).
Open and modify include/checklogin.php
after this block of code :
if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
$_SESSION['xoopsUserTheme'] = $user_theme;
}
insert :
$fp = fopen('path/to/my/log/loguser.csv','a');
if($fp) {
$infos = array();
$sep = ';';
$infos[] = date("Y-m-d");
$infos[] = date("H:i:s");
$infos[] = $user->getVar('uid');
$infos[] = $user->getVar('uname');
$infos[] = IP();
$infos[] = xoops_getenv('HTTP_REFERER');
fwrite($fp, implode($sep, $infos)."\n");
fclose($fp);
}
This will create a log file in the CSV format.
You just need to replace the path to your log file.