Forum QuickConnect Check if userName already exists

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

Check if userName already exists

Postby ASH1138 » December 14th, 2012, 11:51 am

Hi,
I want to create a register screen which tells the player that " The username entered is already in use" whenever he types in a username that already exists.

The problem is, you cannot tell who is already in the playersList until you connect to playerIO, but you connect to playerIO only by using QuickConnect.simpleRegister with a valid username.

Any way around this problem? :?:
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Check if userName already exists

Postby Henrik » December 14th, 2012, 12:17 pm

SimpleRegister is for registering and connecting new simple users. If you call that with a username that has already been registered, you will get back a PlayerIORegistrationError that tells you that the username was already registered.

http://playerio.com/documentation/refer ... ationerror

That error class can contain errors for multiple fields, and in general it's safe to just display the error next to the corresponding field, so if the user entered a username that's already taken and an empty password, you'll display both those errors at the same time.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to QuickConnect