Any Idea how to make a plugin that counts each user logins?
Any Idea how to make a plugin that counts each user logins?
Hmm sounds like a nice idea but normally users don't look in very often due to long living cookies, do they?
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.
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 :)
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'
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
No. There isn't any last logged column. There is only one user_registered. But this one doesn't help me any further.
Add a last login column and use the method I suggested. Should be fairly easy. :)
Was this ever built?