Re: logged in users list

2009-08-25 Thread Brendon Kozlowski (Realm)
Okay, thanks Dr. Loboto. :) On Aug 25, 5:02 am, "Dr. Loboto" wrote: > It does not give reliable result too. It will give awful result only - > constant false logouts unexpected for user. When user closes one > browser tab. When user clicks on banner. When user closes all browsers > at once to o

Re: logged in users list

2009-08-25 Thread Dr. Loboto
It does not give reliable result too. It will give awful result only - constant false logouts unexpected for user. When user closes one browser tab. When user clicks on banner. When user closes all browsers at once to open yours site again - now alone. Etc, etc. On Aug 24, 8:56 pm, "Brendon Kozlo

Re: logged in users list

2009-08-24 Thread Brendon Kozlowski (Realm)
Would a JavaScript/AJAX onunload event (or similar for navigation away from current domain) called to a user/logout achieve the same result? On Aug 24, 7:29 am, Junaed Halim wrote: > Thank you all for your advices. I am gonna apply them in my project. > > > > On Mon, Aug 24, 2009 at 6:15 PM, Dr.

Re: logged in users list

2009-08-24 Thread Junaed Halim
Thank you all for your advices. I am gonna apply them in my project. On Mon, Aug 24, 2009 at 6:15 PM, Dr. Loboto wrote: > > You _cannot_ know for sure is user logged in or not. That's why > "last_activity_time" column is used (not "last_login_time") and > updated on each user page request. And

Re: logged in users list

2009-08-24 Thread Dr. Loboto
You _cannot_ know for sure is user logged in or not. That's why "last_activity_time" column is used (not "last_login_time") and updated on each user page request. And you just set user period of inactivity value for yourself and query for all users which have last_activity_time > now - inactivity

Re: logged in users list

2009-08-24 Thread Miles J
Well you dont know if people log out. I guess you would have to save sessions to a database or something, it can get quite complicated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this

Re: logged in users list

2009-08-24 Thread buzachis.a...@gmail.com
Hey, I do the following thing to get all logged in users in my app: - column lastActivity; - in AppController, beforeRender I update that field with current timestamp; - then take from DB the users which did an action in the last 60 seconds or so (you choose a timeout). (this is crappy I think,

Re: logged in users list

2009-08-23 Thread Junaed Halim
Thank you all for your reply. I'll get the logged-in users by adding a datetime column and updating it. But how would I know whether someone has logged out or not? They can simply close the browser without logging out themselves. Am I missing something? On Mon, Aug 24, 2009 at 8:50 AM, Miles J wr

Re: logged in users list

2009-08-23 Thread Miles J
You would need a datetime column named "lastLoginTime" or something equivalent. Then you would update that with the current timestamp each login. Then you would find all users that have logged in within the past x minutes. --~--~-~--~~~---~--~~ You received this m

Re: logged in users list

2009-08-23 Thread Onezino HEAT
please read cake log documentation, u can register everthyng the user do. 2009/8/23 Junaed Halim > Hello all, I am using cake's Auth component for login purpose. > Now my client wants to get a list of all logged in users. > Can anyone give any advice how to do that? > > I also need to prevent m

Re: logged in users list

2009-08-23 Thread Rick
You could use a database table (maybe add columns to one of the auth tables?). user/account login-time When a user tries to log in check that his account is not already in the table. if it is there and the login-time is recent then don't allow login. If not there add his name/account and current