1
limecity
User Log Module
  • 2008/6/17 0:41

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Is there a module which actually shows the activity and log dates of the user?
hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
hervet
Re: User Log Module
  • 2008/7/6 17:35

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


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($fpimplode($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.

Login

Who's Online

394 user(s) are online (282 user(s) are browsing Support Forums)


Members: 0


Guests: 394


more...

Donat-O-Meter

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

Latest GitHub Commits