Page 1 of 1

Default Username Login Behaviour Issue

Posted: 21 Feb 2012, 20:40
by NM
Hi, I was planning to just use the standard login procedure for a game I'm making. I wanted to allow the user to enter their name and login without password.

The problem is that when a user logs in with the same username as someone who is already logged in, the logged in user is disconnected.

To solve this problem I tried using a FindUsersRequest to see if a user exists with the same username before logging in. But this isn't possible as the user isn't logged in yet - the request fails.

What's the best way of checking that a username is unique before login using the standard logging in system?

Cheers

Re: Default Username Login Behaviour Issue

Posted: 21 Feb 2012, 20:49
by NM
I could auto login as a guest and then do the 'actual' user login after - so I can make FindUsersRequests in the login section. But this seems like a silly way of doing it.

Re: Default Username Login Behaviour Issue

Posted: 22 Feb 2012, 07:21
by appels
It's the only way to make it work. Registration systems need to be done in the same way.

Re: Default Username Login Behaviour Issue

Posted: 22 Feb 2012, 08:39
by Bax
NM wrote:Hi, I was planning to just use the standard login procedure for a game I'm making. I wanted to allow the user to enter their name and login without password.

The problem is that when a user logs in with the same username as someone who is already logged in, the logged in user is disconnected.

To solve this problem I tried using a FindUsersRequest to see if a user exists with the same username before logging in. But this isn't possible as the user isn't logged in yet - the request fails.

What's the best way of checking that a username is unique before login using the standard logging in system?

Cheers

Unless you set the "force logout" to true in the Zone configuration, a user with the same name of another one already logged won't be able to login.