[horde] Using hooks to permanently set from_addr and fullname

Kevin M. Myer kevin_myer at iu13.org
Fri Jul 29 14:50:07 PDT 2005


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Kevin Myer <kevin_myer at iu13.org>:
>
>> Going back to my original idea to save the pref, once its been looked up one
>> time:
>>
>> I'm missing something obvious.  I've tried adding a:
>>
>> global $prefs;
>> $prefs->setValue('fullname', $name);
>> $prefs->store;
>>
>> at the end of my hook to lookup the fullname from LDAP.  But nothing 
>> is being
>> saved to my MySQL prefs backend.  What am I missing?
>
> Probably the fact the hook is called *while* the preference is set.
> That might have some undesired side effects.

Well, I found a workaround, sort of.  My overall goal is to use a hook to set
the fullname preference AND to have this be a locked preference, so that the
user cannot modify it.  The problem I am having in particular is that if there
is not an actual value set for fullname, things like querying another user's
FreeBusy info, on the attendees.php screen in kronolith, results in no name
being returned with the data.

So, if I make the preference unlocked, the preference gets looked up by the
hook, and saved in the preferences backend.  But, this has the side 
effect that
users can now modify their fullname preference.  However, this is less of a
problem, than having no name show up at all, when querying FB info.

What it looks like might be happening is this:

If querying a pref for another user (say Identity functions are invoked to
lookup a user's full name, like is done in attendees.php), and if using hooks
to set that preference, and that preference is locked, no value is 
returned. This seems to be the case, regardless if your own information 
is being looked
up, or the information about others.

vfreebusy.php isn't generating an ORGANIZER;CN=Name: line.

I'm not sure if this is a Kronolith problem, or a more general problem with
Identities, or just not currently supported, if using hooks and locked
preferences.

Kevin



-- 
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org




More information about the horde mailing list