1. Prefs will *require* horde users - ie, full phplib stuff.
2. On session creation: if the user has a "preference source" set in their
Horde $user prefs, use it. Otherwise use the site's default storage method.

3. Read preferences in from that source. Fill in any values that are either
locked to site defaults or not set in the users prefs with the site defaults.

4. Store active copy of prefs in the session. This way users are insulated
against site defaults changes causing unexplained changing behavior in the
middle of their sessions.

5. Prefs save, sort order changes (this one is debatable), logout: write all
prefs that have changed to the permanent storage.


Storage sources will be anything that can take a key-value pair. Keys will
be composed of the username (if necessary - eg, imsp/acap servers are
authenticated, so you don't need a username in the key) and the option name.

When stored in the session, the prefs will probably be a multi-dimensional
array like so:

$imp_prefs['key']['val']; // current value
$imp_prefs['key']['acl']; // bitmask encoding whether the user can change
that value, whether it has changed this session, and anything else useful we
think up.

We'll have a utility function setPref($pref) that takes care of checking the
bitmask for changability before changing a value.

Allright, after spelling this out, I think I'm almost ready to code a basic
implementation of it. But, I'd like feedback, so please whittle this into a
finely tuned draft, and we'll have ourselves a prefs system. :)
