Advanced search  

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

Pages: [1]   Go Down

Author Topic: Log User Names  (Read 3576 times)

0 Members and 1 Guest are viewing this topic.

UrOnline

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Log User Names
« on: November 27, 2006, 07:45:40 pm »

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.
« Last Edit: November 28, 2006, 08:03:50 am by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Log User Names
« Reply #1 on: November 28, 2006, 06:53:02 am »

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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

UrOnline

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Log User Names
« Reply #2 on: November 28, 2006, 07:07:55 am »

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.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Log User Names
« Reply #3 on: November 28, 2006, 07:11:53 am »

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

UrOnline

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Log User Names
« Reply #4 on: November 28, 2006, 07:28:45 am »

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.  ;)
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Log User Names
« Reply #5 on: November 28, 2006, 07:39:51 am »

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 ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

UrOnline

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Log User Names
« Reply #6 on: November 28, 2006, 07:41:33 am »

Your the greatest. Thanks for pointing me in the right direction.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.