Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework Components > Authentication & Authorization

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-2009, 06:11 PM
Junior Member
 
Join Date: Jul 2009
Posts: 2
Question View all active sessions?

I'm working on the back-end of a Zend Auth/ACL-based site. Is there an "easy" way for an "Admin" (as defined by the ACL) to view a list of all active sessions/identities?

Thanks for the help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-02-2009, 12:24 AM
Senior Member
 
Join Date: Jul 2008
Posts: 288
Default

I doubt there is any inbuilt way, and doing it manually would need some knowledge about how your sessions are stored.

The default session handler stores sessions in a file, names for the session ID and containing a serialized version of the $_SESSION array. I guess you could iterate over the files, unserialize and extract the information you want.

The same could be done for DB backed sessions. For memcached (or similar) sessions, you might be out of luck.

Also, just because the session still exists on the server doesn't mean it's active on the client (ie. they may have closed the browser, started a new session, logged in again.. whatever)

Another option might be to store the last action time against the user record, then you can grab all the users that have been active within the specified "session time".
__________________
Brenton Alker
PHP Developer - Brisbane, Australia

blog.tekerson.com | twitter.com/tekerson | brenton.mp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-02-2009, 06:49 AM
Junior Member
 
Join Date: Mar 2009
Posts: 2
Lightbulb

I think you need to change the storage of login sessions to be in database. Then, you can easily query it.

Regards,
Hamid
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-02-2009, 12:13 PM
Junior Member
 
Join Date: Jul 2009
Posts: 2
Default

Quote:
Originally Posted by hamidhossain View Post
I think you need to change the storage of login sessions to be in database. Then, you can easily query it.

Regards,
Hamid
That was my idea also, I was just hoping there was a different way.

Thanks for the help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 01:07 AM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0