[horde] horde_datatree and changing usernames

Chuck Hagenbuch chuck at horde.org
Thu Nov 1 02:46:43 UTC 2007


Quoting CJ Kucera <pez at apocalyptech.com>:

> Occasionally on our system, we have need to change a username, and when
> we do so, we'd like to automatically move over that user's addressbook
> and Horde preferences, etc.  The process is quite simple, it looks like
> we basically just need to update the following fields in the following
> tables:
>
>    pref_uid in horde_prefs
>    owner_id in turba_objects
>    user_uid in horde_datatree
>
> That seems to work just fine, but I've noticed that for the
> addressbooks, their entry in horde_datatree has the username stored in
> both user_uid and datatree_name.  When I update user_uid for those
> horde_datatree rows, should I be updating datatree_name as well?  Or
> should I leave that the way it is?  My current testing scripts leave it
> alone, and the addressbooks seem to still work fine, but I wouldn't want
> to introduce strange behavior that I'm just not noticing yet (which
> could end up biting me a few months after the fact).

It's probably a good idea to change the datatree_name also. The things  
it might break if you don't are things like auto-detecting a user's  
default share.

-chuck


More information about the horde mailing list