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
Default Username Login Behaviour Issue
Default Username Login Behaviour Issue
Cheers, NM
Re: Default Username Login Behaviour Issue
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.
Cheers, NM
Re: Default Username Login Behaviour Issue
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
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.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 87 guests