[horde] Cleaning out preferences after account removal?
Kevin M. Myer
kevin_myer at iu13.org
Thu Dec 22 17:44:05 PST 2005
Quoting amy.rich at tufts.edu:
> So for sites that have a lot of account turnover, how are you handling
> cleaning out the horde preferences database after you decomission users' IMAP
> accounts?
Here's what I intend to do (someday). We currently have accounts setup
through a custom web application that handles creation of their LDAP
information and their IMAP mailbox and then associated systems (i.e.
file server) pick up the change and autocreate home directories. That
can fairly easily be ported to the accounts management that's in Horde,
with a hook to handle the custom attributes and the creation of the
IMAP mailbox. Then, I'd like to have a corresponding hook for when an
account is deleted, that removes their mailbox, LDAP information, and
deletes their preferences, datatree entries and history entries from
Horde. My philosophy is that if I can store the information in one
place and then propagate that info as needed (saying using hooks for
from_addr, or fullname), the better off, and more accurate the
information is.
If you're using a SQL backend (which I seem to recall you are, since
you had problems with the MySQL sessionhandler), then a base you could
use is the scripts/remove_prefs.php script, which is really only
intended to remove a single pref for a user, but it can be easily
modified to delete all the prefs for a user as well (see for instance
this thread:
http://lists.horde.org/archives/horde/Week-of-Mon-20050905/028770.html). Or,
maybe for inspiration, look at http://wiki.horde.org/RenameUsers, which
is geared towards renaming users but could just as easily be used to
delete users with a few substitutions.
As for what I'm doing currently about orphaned Horde database entries?
Nothing.
Kevin
--
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13 http://www.iu13.org
More information about the horde
mailing list