In Cakephp /app/config/core.php file you will find some options for sessions. You need to set the option to keep the sessions in database. For this you need to create a table in database with required fields like: id, user_id, userId etc. Cake will take care of it and fill your fields with the required information. Than you need to set the "sessiontable" option with the new session table name. It means there are couple of options in core.php for session and you need to set them accordingly. Than you will be able to count the logged from this table.
Let me know if there is still any confusion or query.
Today is my exam, so i will be able to answer you questions after 7pm.
Thanks,
Ravi Verma
On Fri, Apr 1, 2011 at 10:42 PM, <jairishab@gmail.com> wrote:
I'm unable to find out the ways of finding out who all users are logged in. Can somebody plz share a piece of code where something like this is done?
RishabSent from BlackBerry® on Airtel
From: Rishab Jain <jairishab@gmail.com>Date: Fri, 1 Apr 2011 17:32:34 +0530Subject: Re: check for the users who are logged in@Ravi: Could u please tell me the changes we need to make in core.php?--
regards,
RishabOn Fri, Apr 1, 2011 at 3:47 PM, Ravi Verma <raviverma.5688@gmail.com> wrote:
Hi Jeremy,
CakePHP takes care of it. they updates the session table on each refresh of the page by user and if there is long delay in session updation, cakephp considers it a non-authentic and removes it. So you do not need to worry about it.
Let me know if I'm wrong in any point.
Thanks,
Ravi VermaOn Fri, Apr 1, 2011 at 3:38 PM, Jeremy Burns | Class Outfit <jeremyburns@classoutfit.com> wrote:
Not true as it doesn't remove users who just navigate away. This is an inexact science at best.
Jeremy BurnsClass OutfitOn 1 Apr 2011, at 11:03, Ravi Verma wrote:--Hi Rishab,
You just need to make changes in the core.php file to keep the sessions in database. In this regard you will be able to count and display, which user is currently logged in.
On Fri, Apr 1, 2011 at 12:13 AM, cricket <zijn.digital@gmail.com> wrote:On Thu, Mar 31, 2011 at 1:03 PM, Rishab Jain <jairishab@gmail.com> wrote:Rishab, have a look at this recent thread:
> Hi,
>
> Since cake is taking care of the session, I want to know who all members of
> the site are currently logged in.
>
> Has anybody ever written code something similar to this? It would be great
> if you could help me here.
http://groups.google.com/group/cake-php/browse_thread/thread/fda520971695ce5d
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Thanks & Regards
=====================
Ravi Verma
Software EngineerOur newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Thanks & Regards
=====================
Ravi Verma
Software Engineer
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Thanks & Regards
=====================
Ravi Verma
Software Engineer
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment