Expand my Community achievements bar.

SOLVED

Logout/Login back to LCCS

Avatar

Former Community Member

Hello,

I have a small problem, I have many users in a room, that are talking in private, 2 by 2. Whenever one finishes a conversation, I log both of them out of the room. After that, they have a button that should enable them to start a new conversation.

My problem is that I don't have an event that fires up after that user logs in. I have tried the listener: SessionEvent.LOGIN, but it dosen't appear to work.

So my questions:

1. how do I know when I'm logging in after doing: cSession.login()

2. Is there a better to "finish" a conversation?

(Hope I was clear enough )

1 Accepted Solution

Avatar

Correct answer by
Employee

The "standard" way is to listen to SessionEvent.SYNCHRONIZATION_CHANGE. When the session is synchronized you are succesfully logged in.

When is not synchronized you are logged out. You may also want to list to the authenticator login error event (don't remember the exact name right now) to cover mispelled passwords and such.

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

The "standard" way is to listen to SessionEvent.SYNCHRONIZATION_CHANGE. When the session is synchronized you are succesfully logged in.

When is not synchronized you are logged out. You may also want to list to the authenticator login error event (don't remember the exact name right now) to cover mispelled passwords and such.

Avatar

Former Community Member

As raff mention , you should listen to synchronization change event,

and check for whether the session is synchronized by doing

If ( session.isSynchronized ){

// it's logged in

}else{

// it's logged out

}

All session components inherits from IConnectSession which has this

read-only property

Hope this helps

Thanks

Hironmay Basu

Sent from my iPhone

Avatar

Former Community Member

Hello,

I have done what you said. I'm still experiencing some problems. After the 1st relog, it suddenly stops.

Do webcam, audio or even the mxml inside the ConnectSessionContainer have to reinitialized(re-created)?

Found some little tutorial to this on: http://www.lafabrick.com/blog/en/2009/01/31/2175-hello-afcs-bye-cocomo-simple-user-authentication-wi... - this is really, old, but it does say something about that problem.

Avatar

Former Community Member

What problem are you facing ? You need to do connectSession.logout()and later to relogin do connectSession.login(). You don't need to reinitialize but you might call audio/web component's subscribe() function.

Thanks

Hironmay Basu