[Date Prev][Date Next]
Re: Unique user accounts
On Wednesday 24 September 2003 18:43, Markus Schaber wrote:
> > Our scenario:
> > Our customers get unique, but ugly identifiers which are created by a
> > mechanism not under our control.
> Those identifiers are, as I wrote, unique, and thus serve well as an
> internal ID tag. So I don't need an "atomic incremental" scheme for
> creating unique ids in a near-sequential way.
> > Now we want to enable them to create alias names via web interface. As
> > this alias names are to be used for creation of web urls and email
> > adresses, they must be unique.
> > Now, how can I ensure in a bullet-proof way that an alias name is
> > unique?
Don't test and write, but write and test the result.
If the write is successful, then use this value.
If the write fails with the error message that such an entry is already there
(LDAP_ALREADY_EXISTS) then let the user try another alias.
The LDAP server has to make sure that no two objects with the same
name get entered into the same container in the directory.