[horde] horde_datatree and changing usernames

CJ Kucera pez at apocalyptech.com
Wed Oct 31 21:25:11 UTC 2007


Hello...

I've got Horde set up to auth with Imp (with an IMAP backend), and user
preferences and datatrees (and addressbooks, etc) are stored with a
mysql backend.

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).

Thanks,
CJ

-- 
WOW: Flemmy            |   "Happiness isn't good enough for me!  I
pez at apocalyptech.com   |              demand euphoria!"
24.24.2.3171           |                  - Calvin


More information about the horde mailing list