I'm not sure if I'm doing something wrong, but I've created a view with two fields (user picture and user name) and filtered by 'is Online'. All I get is the 'anonymous' picture and name even though I'm logged in on two accounts. If I switch it to 'is offline' I get the same result. I've set permissions, and run cron just to make sure everything is up to date.

I can't figure out if it's my error or a bug in the module, but I can't seem to get this working.

CommentFileSizeAuthor
#4 user_stats.is_online.patch765 bytesneurovation.kiwi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cerup’s picture

Status: Active » Fixed

For anyone else that's having this issue, I found that in order to filter a view by "is: online" you also have to filter "is: Active = yes." Without setting the active filter, this seems to only return non active users.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

vinoth.3v’s picture

Category: support » bug
Status: Closed (fixed) » Active

for me too,

I added the isonline field in fields section of the view. But i am getting unexpected Behavior.

Thanks

neurovation.kiwi’s picture

Status: Active » Needs review
FileSize
765 bytes

Hiho,

well, the filter does always filter for online users, disregarding if it is set to online or offline.

attached is a patch that fixes that issue.

cu
kiwi

thomasgm’s picture

WOW, it worked now, my filter is complete :) thanks neurovation.kiwi

thomasgm’s picture

Thank you god of drupal :D

Gabriel R.’s picture

Works well, should be rolled in.

neurovation.kiwi’s picture

Status: Needs review » Reviewed & tested by the community

well - than change the status ;)

delphium’s picture

Status: Reviewed & tested by the community » Needs review

Greetings, this issue appears to have risen again, it did used to work, but does no longer since some recent required module updates.

When I am in the views editor I may apply the "User:Is Online" field and filter, unfortunately it beleives that all users are offline all the time, made evident when printing out the field and it prints "Offline" next to all users and shows blank if the filter is set to as "Online".

Using the latest 6.x-1.x-dev release from 2011-Oct-18 of user_stats along with Views 6.x-2.16.

Any help would be greatly appreciated.

EDIT:- It appears that memcache was having an effect with the user sessions that I was not fully expecting, causing this to no longer function.

Thanks
Delph.

neurovation.kiwi’s picture

not sure if this is a problem of userstats, since it does not create any data, but only checks with the value in the db: user.access.

please check the values in the users table, i guess, the acces value is older than 900 secs in each user entry.

if my assumption is true, than neither views nor user_stats has an issue, and you have to look up why the user.access information is not updated properly.

cu
kiwi