The MU forums have moved to WordPress.org

login counter (9 posts)

  1. DrkWrz
    Member
    Posted 15 years ago #

    Any Idea how to make a plugin that counts each user logins?

  2. helmi
    Member
    Posted 15 years ago #

    Hmm sounds like a nice idea but normally users don't look in very often due to long living cookies, do they?

  3. DrkWrz
    Member
    Posted 15 years ago #

    I don't know much about coockies. But maybe we could make a secon cookie with a shorter livetime(like 1 or 2 hours).

    When the user logs in it checks if the second cookie is set(to one with the short livetime). If it isn't set he set it and adds one to the login counter.

  4. helmi
    Member
    Posted 15 years ago #

    sorry for sounding hard but that sounds a bit like "we should show the users some more numbers that look like statistics".

    That number wouldn't say something about "how often logged in" but instead something like "how often did you come back to your blog admin".

    If you think they need it :)

  5. DrkWrz
    Member
    Posted 15 years ago #

    It's not for the users. It is for the 'admins' so they cold know if the user is 'green' or if its an 'expirienced one'

  6. drmike
    Member
    Posted 15 years ago #

    Doesn't the wp-user table have a last logged in column? I can't remember.

    Best bet would be to add in a counter column, figure out where the last logged in column gets update and just add one to the counter right after that.

    Hope this helps,
    -drmike

  7. DrkWrz
    Member
    Posted 15 years ago #

    No. There isn't any last logged column. There is only one user_registered. But this one doesn't help me any further.

  8. drmike
    Member
    Posted 15 years ago #

    Add a last login column and use the method I suggested. Should be fairly easy. :)

  9. mrjcleaver
    Member
    Posted 14 years ago #

    Was this ever built?

About this Topic

  • Started 15 years ago by DrkWrz
  • Latest reply from mrjcleaver