
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
- Implement sorting (by $createdAt) while ...
??
- Query Not Getting Results
I am trying to query my collection Categories. Initially, I tried to query by the documentId, but that yielded no results. I then added an index on $id, that ...
- Global Variables
I'm building a Azure DevOps Pipeline Task to deploy my functions to Appwrite using REST APIs. How can I set project global variables via REST? This endpoint do...
