Hi Rishab,

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, <[email protected]> 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?
>
> Rishab
>
> Sent from BlackBerry® on Airtel
> ------------------------------
> *From: * Rishab Jain <[email protected]>
> *Date: *Fri, 1 Apr 2011 17:32:34 +0530
> *To: *<[email protected]>
> *Subject: *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,
> Rishab
>
> On Fri, Apr 1, 2011 at 3:47 PM, Ravi Verma <[email protected]>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 Verma
>>
>> On Fri, Apr 1, 2011 at 3:38 PM, Jeremy Burns | Class Outfit <
>> [email protected]> wrote:
>>
>>> Not true as it doesn't remove users who just navigate away. This is an
>>> inexact science at best.
>>>
>>> Jeremy Burns
>>> *Class Outfit*
>>> *
>>> *
>>> [email protected] <[email protected]>
>>> http://www.classoutfit.com
>>>
>>> On 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 <[email protected]> wrote:
>>>
>>>> On Thu, Mar 31, 2011 at 1:03 PM, Rishab Jain <[email protected]>
>>>> wrote:
>>>> > 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.
>>>>
>>>>  Rishab, have a look at this recent thread:
>>>>
>>>> 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
>>>> [email protected] 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
>>> [email protected] 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
>>> [email protected] 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
>> [email protected] 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
> [email protected] 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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to