Is it advisable to store username in user Metadata...
# support-questions
d
Is it advisable to store username in user Metadata?
r
Hey @dhatGuy
The user metadata is just a key value store per user.
So you can store anything in there, as long as you want to query it using the user id
For the case of username, if you want to check if a username is unique, then you will have to loop through all the users, fetch their metadata and then check their usernames. This is as opposed to storing the username yourself and making that a primary key
So I wouldn’t advise to store the username in user metadata
Unless you don’t care about it being unique. Then it’s fine
d
Okay. Thanks
2 Views