SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast remdog's Avatar
    Join Date
    Mar 2002
    Location
    Montreal, Canada
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    track who has logged into the secure area

    We have a secure area on our site accessible by logging in with a username/PW. We'd like to be able to track who has logged into the secure area--don't need to know when or how often, just who (ie, which customer). Is there off the shelf software that can do this? Is this something easy for our developer to do?
    Our site is done up with PHP/mysql.
    Thanks.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pretty easy I guess.... just add an "accessed" field to your users table that's just a bit/boolean field and set it to 'true' as a part of the login procedure. It doesn't matter if you repeatedly set it to 'true'.

    And in fact, you may not want to know how many times people access it right now, but you might in the future, and it would be equally easy to make "accessed" an int field (set to 0 by default) and add one to it every time someone logs in, again as part of the login procedure. That way if "accessed" is greater than 0 then the user has logged in (core info) and also if you DO want to know how many times someone's logged in, the data's there...

    G

  3. #3
    SitePoint Addict devil cat's Avatar
    Join Date
    Apr 2003
    Location
    Reno
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not that hard. I have a similar system on my site which logs the IP number and whether or not the person was admitted. I just created a database table for the necessary information and a short script to input users as they go in.

  4. #4
    SitePoint Enthusiast remdog's Avatar
    Join Date
    Mar 2002
    Location
    Montreal, Canada
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How much dev time (in hours) would you estimate this to take?

  5. #5
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2 Minutes for the database and another 15 at most for altering the scripts that you have to query/insert/update the database tables in question... About the time logging though ? You'll proberly need to create another table to hold the time logged on and logged off and an INT field to refer back to which user in relation to the users table - ie the Primary Key.

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Time logging isn't needed is it? If you go for your basic requirements, then shave that down to about 5 minutes total!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •