Another thing you may want to do is distinguish between a system
logout or a user logout?
On 25 Aug 2009, at 01:44, Daniel Latter <[email protected]> wrote:
I assume you are talking about 2 users using the same login? But on
different comps?
You will need to log the ip or other uniquely location identifying
details, that way when user 2 logs in you can check if someone is
logged in using same login details but different location -
determined by the location identifying details - ( this would be
user 1 ),
So you delete user 1's session from db. Now when user 1 accesses a
page that requires them to be logged in, you can display a message
saying they have been logged out.
Hope this makes sense,
Daniel
On 24 Aug 2009, at 16:54, slahti <[email protected]> wrote:
I did attempt to implement this. The issue I had is in notifying
the 1st
logged in user that he has been logged out, this introduced what I
like to
call major redirect issues. Do you happen to have a sample in your
archives
of how to handle a situation similar to mine. Using
SaveHandler_DbTable?
http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/
Ralph Schindler-2 wrote:
The best way to accomplish this is by using a session storage
facility
that would allow you to do lookups.
When using Zend_Session with the standard data-store of files, its
very
hard to query the files for APPLICATION layer queries (like how many
users are logged in, what are their names).
The best you can do is use the Zend_Session_SaveHandler_DbTable
storage
mechanism (you might want to write you own that will also break
out the
user information from the session serialization data into its own
row).
This will allow you to search through all available sessions and
remove the ones that are of the same user identity, but of different
session identifiers than the current one.
Hope that helps!
Ralph
Hector Virgen wrote:
I don't see how logging out User A on PC 2 has any effect on User
A on
PC 1 unless they are using the same session ID.
Are you testing this on a single PC? If so, I'd suggest using a
totally
different browser altogether to log in as User A on PC 2 because
sometimes opening new windows in the same browser causes it to
use the
same session ID.
--
Hector
On Mon, Aug 24, 2009 at 7:40 AM, slahti <[email protected]
<mailto:[email protected]>> wrote:
I have been struggling for over a week looking for a solution that
will
prohibit multiple logins. I have tried using the session tables to
no avail.
I would like to include Auth in this process, but seem to be
running
into
issues with ->ClearIdentity() Killing the user SITEWIDE.
This is what I would like to accomplish:
1) User A logs in on PC 1
2) User A logs into PC 2
3) User A is allowed on PC 2
4) User A is logged out of PC 1 with an message ("You have been
logged out
...)
Any help given would be VERY APPRECIATED!!
--
View this message in context:
http://www.nabble.com/Elegant-Solution-Needed-for-Preventing-Mulitple-Logins-tp25117266p25117266.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
View this message in context:
http://www.nabble.com/Elegant-Solution-Needed-for-Preventing-Mulitple-Logins-tp25117266p25118550.html
Sent from the Zend Framework mailing list archive at Nabble.com.