How to create a user with unique name and email?

0 votes
Let's say that a player who is new to a game doesn't want to spend any time for signing up. So when someone opens a game for the first time I want to create a new user with unique name and email.

The name could be like this "user999" where "999" is the number of user. So when I want to create a new user I just have to fetch the name of the last user that has been created and create a new user with a name that's based on the name of the last created user.

But if there are a few players who are new to the game, there might be a situation when it tries to create two new users with the same name.

How would I prevent this from happening and be sure that a new user with a unique name will be created without errors?
asked Jan 22, 2017 in Unity by xerolp933 (22 points)
edited Jan 22, 2017 by xerolp933

1 Answer

+1 vote
 
Best answer

Hi Xero,

Greetings from ShepHertz!!!!

You can use device/Platform Id or timeStamp to create an User on App42 Platform. You can save the same in Unity Pref so that you can use the same when player or user returns.

Let me know if it helps.

Thanks

Vishnu Garg

answered Jan 22, 2017 by Vishnu Garg (674 points)
selected Jan 22, 2017 by xerolp933
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...