How can we manage to give unique names to user so that no other user can get the same or earlier taken name.
either just create random strings or ID.unique()
No I want to go with user's provided names
technical when a user is created it already assigns unique id
so even if the names are same it's dosen't matter
I wanted to let user create custom names so that they can get custom URL to accounts
map this to collection then and check every time before assigning the user name that if this already exist
like a create a custom name -> create a document with name and who created it(user)
then if query everytime a user is creating a custom name check if it's already exists or not
This could be a solution but if Appwrite gives us access to Edit Document's or User's ID then will be simple for us.
if the is property like unique in attribute that would be more easy
like in sql
@Steven I think we should add support for editing document's ID's this way we can handle unique user's names
you don't have to editing document's ID just create the document with custom name
document id as custom name so that no other user can create same document
@Hassanmrwt i think this does meet your requirement
Yes this also does but I want user to edit their custom names any time or after specific time.
With this we can control things in registration time but later when user want to change his user name then?
store(in response)/get the prev document -> delete that document -> create a new one with new name as docId (check if exist or not) and whatever with previous data that was present in at that time with that prev response
``
this opens a big can of worms. For example, they would lose access to things because the permission on some document was read("user:old_id")
for your case, you might want to use a separate attribute for username
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...