I'm stumped. I have about 150 users on my site and when I add this field "user is online" it says that all 150 of my users are online. I know that isn't true and I tested it by logging out and looking at the page where I have the view rendered with the list of users - and sure enough, the account I just logged out of says that I'm still logged in (I thought maybe it stores it for a while as being still logged in, so I waited a good 30 mins and I was still logged in).

Is there anyone that can tell me what is breaking with this? It would be nice to show when my users are logged in or not.

Thanks.

Comments

foolofatook’s picture

oh, ps- i was using version 6.x-1.0-rc1 and I figured I'd try the 6.x-1.x-dev version, but when I went to enable the field in my view, these errors came up:

warning: pg_query() [function.pg-query]: Query failed: ERROR: column reference "uid" is ambiguous LINE 11: GROUP BY uid ^ in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
user warning: ERROR: column reference "uid" is ambiguous LINE 11: GROUP BY uid ^ query: SELECT COUNT(*) FROM (SELECT DISTINCT(users.uid) AS uid, FIRST(users.picture) AS users_picture, FIRST(users.name) AS users_name, FIRST(users.mail) AS users_mail, FIRST(users.login) AS users_login, FIRST(users.access) AS users_access, IF((1306444628 - MAX(sessions.timestamp)) < 900, 1, 0) AS users_is_online FROM shared.users users LEFT JOIN shared.sessions sessions ON users.uid = sessions.uid WHERE (users.status <> 0) AND (users.uid <> 1) GROUP BY uid ORDER BY users_name ASC ) count_alias in /usr/share/drupal6/sites/all/modules/views/includes/view.inc on line 745.
warning: pg_query() [function.pg-query]: Query failed: ERROR: column reference "uid" is ambiguous LINE 11: GROUP BY uid ^ in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
user warning: ERROR: column reference "uid" is ambiguous LINE 11: GROUP BY uid ^ query: SELECT DISTINCT(users.uid) AS uid, FIRST(users.picture) AS users_picture, FIRST(users.name) AS users_name, FIRST(users.mail) AS users_mail, FIRST(users.login) AS users_login, FIRST(users.access) AS users_access, IF((1306444628 - MAX(sessions.timestamp)) < 900, 1, 0) AS users_is_online FROM shared.users users LEFT JOIN shared.sessions sessions ON users.uid = sessions.uid WHERE (users.status <> 0) AND (users.uid <> 1) GROUP BY uid ORDER BY users_name ASC LIMIT 20 OFFSET 0 in /usr/share/drupal6/sites/all/modules/views/includes/view.inc on line 771.