Use ajax. Simply send the first and last name to your server side code and have a method that queries the database for the nickname. If the nickname exists, on the server, find the next available numbered nickname. Return the nickname to the client side.
Jul 14, 2016
2
Level 1
Unique Nickname during registration (automatically - no user input)
Hello ,
I need some help with a small issue . When i create a user , i am also creating his profile at the same time and setting his nickname..
The nickname is a combination of the first and last name . However i need the nickname to be unique .
Since this is done automatically at registration , i can't ask the user to change it .
basically Nick = firstname.lastname
During the registration process - i want to check the database to make sure there is no other nickname like this else add a number at the end e.g : firstname.lastname.3
is there any way to do that ?
Please or to participate in this conversation.