[horde] User id numbers

Richard Wallace rwallace at thewallacepack.net
Thu Oct 21 18:41:21 PDT 2004


Chuck Hagenbuch wrote:
> Quoting Richard Wallace <rwallace at thewallacepack.net>:
> 
>> What would be the best way to associate an id number to a user.  We're
>> going to be using the sql backend and would like to be able to change a
>> users name without affecting how they are seen by the system.  Should I
>> use the tobackend() and frombackend() hooks, or something else?
> 
> 
> You should change their name (i.e, their identity), and leave their userid
> alone; even if you map it to something else in the backend, it'll cause
> problems in Horde if you change it.

The only place the user name is really relevant in our usage is during 
login, beyond that it doesn't really get used.  We'll be using a custom 
Identity implementation (something that uses an app or a db backend to 
lookup user info) for anything else.  The user would never see the 
actual uid that horde is using.  So if we write a frombackend() hook to 
lookup the username and map it to an id, then after the user is 
authenticated the setAuth() method will call the addHook() method which 
will call the frombackend() hook and use the id instead of the username 
from that point on.  So Auth::getAuth() will return the users id, not 
the users name.  Which means that the id will be used for prefs and 
everything else.  This wouldn't break anything that I can think of and 
we could change the users name at will.  Is there something I'm missing 
or not thinking of?

Thanks,
Rich



More information about the horde mailing list