question

Kim Strasser avatar image
Kim Strasser asked

CloudScript: Is it possible to find out if a username or email address is already used by another player

At the beginning, the player is logged in with iOS/Android device ID. Then the players enters his desired username and email address in the text fields. After that, I want to find out if the players desired username and email address are already used by another player before the player can call AddUsernamePassword.

I know that I can find out in the client code with API GetAccountInfo if a username or email address is already used by another player. Is it possible to do the same thing in cloud script? If not, would it be possible to do it in Azure Functions?

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

PlayFab has provided the built-in verification mechanism for the repeated names and login emails. When you add an existed user name or login email to a player. The AddUsernamePassword API would return this error -- "User already linked to a different account". So you needn’t implement this feature on your own. You just need to catch the error whose code is “1011”.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kim Strasser avatar image Kim Strasser commented ·

Thanx. It works now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.