Page 1 of 1
Turn on Multiple Logins
Posted: 20 May 2012, 14:28
by Bosskafett
How do you turn on Multiple Logins in SFS PRO? Thanks.
Re: Turn on Multiple Logins
Posted: 21 May 2012, 10:51
by Bax
What does "multiple login" means?
Re: Turn on Multiple Logins
Posted: 21 May 2012, 20:39
by Bosskafett
Simply allow users to login more than once? Is it possible? I'm sure it is

Re: Turn on Multiple Logins
Posted: 21 May 2012, 22:17
by rjgtav
Hi.
Sorry but I think you misread it. A client can only login once (unless you create several SmartFoxClient instances but why would you need that?). Can you please describe better what do you want to achieve? And are you sure that you aren't referring to joining multiple rooms instead?
Re: Turn on Multiple Logins
Posted: 22 May 2012, 09:58
by Bosskafett
I have created a chat application where you can join a chat from a link e.g.
www.aurorachat.me/lobby. I want users to be able to login to multiple chats (rooms) but not the same one more than once. Is this possible? Thanks you.

Re: Turn on Multiple Logins
Posted: 22 May 2012, 20:25
by rjgtav
Hello.
You could create a Room for each Chat Room instead of different Zones. That way you would only need to login once and then you could join multiple rooms by providing true as the dontLeave parameter in the smartfox.joinRoom() method.
Re: Turn on Multiple Logins
Posted: 23 May 2012, 11:52
by Bosskafett
Wait, I need a user to be able to login to two client screens and have the same user in different rooms at once. Is it possible to login to the same user that's already logged into a room? This will make the user able to chat in two rooms while on the same user.
Re: Turn on Multiple Logins
Posted: 24 May 2012, 08:51
by Bax
This is not possible. You can't have the same user perform two separate logins at the same time using the same username.
Re: Turn on Multiple Logins
Posted: 24 May 2012, 09:52
by Bosskafett
So, the Server reads the Username ( user.getName() ) if I can randomise the end of that and record a different variable with the display username (e.g. user.setName(resObj.name + random_number) & user.setRealName(resObj.name) ). I will try something like that. Tell you what happens after.
Re: Turn on Multiple Logins
Posted: 27 May 2012, 21:46
by rjgtav
Hi.
You could try sending the SmartFoxClient object from the main client to all the other different windows, via JavaScript. Then you would just need to join multiple rooms instead of logging in multiple times.