I have assigned a slug to each user that works just like the unique ID pulling the information from the specific users profile and displaying it when needed or as needed. The problem is I have to physically type the slug in once the profile is created and just like the user ID there cannot be the same slug twice.
My question is;
how can I set the user’s slug as their email address so the slug assigns to the user automatically. Also the bonus to this is, no 2 email address can be the same.