I am using:

Login count: print user_stats_get_stats('login_count', $user->uid);

In a php enabled node and it prints 0. I am using this wrong or is it a bug?

Comments

liam mcdermott’s picture

This isn't a well implemented feature, to be frank. It counts a login only when someone who is logged-out arrives at the site and uses the login form.

I'm assuming you're trying this on a test site, so I may be wrong, but, the likelihood is that you logged in with your admin user, installed User Stats, then created your node. Since User Stats can't retrospectively find log in counts it reported zero.

If you feel like having a stab at a better version of this feature, please do. I'll be really happy (and I'll try to help out).

chuckbar77’s picture

I was wondering if you had any progress on this feature fix? Thank you

adit234’s picture

same in here....