Log User Names Log User Names
 

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

Main Menu

Log User Names

Started by UrOnline, November 27, 2006, 07:45:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

UrOnline

I've search the board and haven't found a solution.

I would like to log User names every time they log in. Is this possible?

Thanks in advance.

Sami

Yes it's possible ,
- Use  USER_NAME constant it will set after each authentication
- OR just query the xxx_users table

BTW there is some plugin for online users stat , look at the cpg1.4 plugin contributions
‍I don't answer to PM with support question
Please post your issue to related board

UrOnline

I'm not sure that I completely understand. This will keep a log of every time a user logs in. And if yes (and it's not too complicated to explain) can you explain it just a little more. I'm kinda new at php (even though I'm a Windows Programmer - so at least I have some coding experience).

Thanks a lot.

Sami

Let me know what do you want to do , your first post was just about possibility
‍I don't answer to PM with support question
Please post your issue to related board

UrOnline

I would like to have a log (text file or something similar) that has in it - Date, Time, and UserName. Basically whenever a user signs in it should log it. This should be similar to the log files that already exist (in Logging and statistics) such as eCards and Vote Statistics.

I guess it's time for me to go out and buy the PHP For Dummies book (at least to start), and start burning the midnight oil. I would love to have some kind of clue about how pHp works.  ;)

Sami

You have all this info on database (xxx_usres table)

this plugin may help you to get the idea:

http://forum.coppermine-gallery.net/index.php?topic=35233.0

just look at the codebase.php and find the online_today($html) function , there is a mysql query ;)
‍I don't answer to PM with support question
Please post your issue to related board

UrOnline

Your the greatest. Thanks for pointing me in the right direction.