restrict multiple login of same user? 7 Months, 1 Week ago
Karma: 0
I have not discovered a way to restrict one user to only logging in once at a time on my Joomla 1.5 site. You can login in one browser, then open another and login again as the same user.
This normall is not a big deal, but in the blastchat module, it lists all logged in users, including multiples of the same name, if there are multiple logged in.
I've not found a way to restrict this in Joomla 1.5. Apparently setting the $SITE = 0 in oomla 1.0 woudl accomplish this but it seems to have been removed.
Anybody know of a way around this problem? It is very confusing for our users.
Re:restrict multiple login of same user? 7 Months, 1 Week ago
Karma: 6
I think in the next version (the joomla 1.5 native version) this will be fixed , I saw this too when testing the joomla 1.5 native beta and Prutkar knows about it
Re:restrict multiple login of same user? 7 Months, 1 Week ago
Karma: 49
I think you must understand how it works:
Joomla whoisonline module grabs username, guest from _session table and makes it a DISTINCT grouped by username -> this means it will create only 1 row for multiple occurrences of single username, because Joomla session logged in user has only one state, i.e. logged in or not. So even if user open multiple browsers and loggs into your website multiple times he is always just logged in.
BlastChat must adjust for a status "chatting" or "not chatting" -> selects username, guest from _session table and adds status from blastchatc_users table, connection between _session and _blastchatc_users table is done using session_id (so that we can track guests, who has only session_id, userid for guests is always 0, and only session_id distinguishes guests).
That's why multiple session for single username are presented in blastchat module. You are very welcome to adjust blastchat module, it could be possible to use same query as native Joomla whoisonline module is using, then take results and go row by row and seleting information from blastchatc_users table to find out who is chatting and who is not, but that might select incorrect data. This becomes more and more complicated and adds more stress on your server handling query with group by, order by in it (temporary tables etc.).
If I find time I might take a look and may be find better solution, but it is a low priority. BlastChat module is only a non-essential add-on.