I would check if the user already exists in the session, but send the
redirect from a Page.  You can refactor the redirection code into a base
class and extend as required.

Ed.

On Mar 13, 2010 2:04 PM, "Nishant Neeraj" <[email protected]>
wrote:

The use case is like this.

You have logged-in in a browser's tab and in another tab, you click on a
moderate-comment mail that automatically logs you in as another user, and
takes you to the comments-moderation page of the application.

Now, at this point, I want to ask the user if he wants to switch account.
[The way Google does if you are signing-in in two tabs as different users]

So, instead of comment-moderation page, I want to take user to "Do want to
switch account?" page (if another user is already logged-in in another tab).
Depending on the users decision I will either invalidate the old session and
log-in as new user or will just take the user to already logged in session's
home page.

The thing is, I wanted to do this all the time. Whenever I am calling
MySession.get().setUser(UserVO uvo), I want to check if there already exists
a different userVO in the same session. If so, the end user must be
notified.

Thanks
Nishant

On Sat, Mar 13, 2010 at 7:24 PM, Edward Zarecor <[email protected]
>wrote:


> What's the use case? Session events won't always occur within the
> context of a RequestCycle, s...
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to