[horde] pref hooks
Otto Stolz
Otto.Stolz at uni-konstanz.de
Thu Feb 8 01:26:02 PST 2007
Hello Kevin,
you wrote:
> it seems [_prefs_hook_fullname and _prefs_hook_from_addr] are being called
> twice before a "Login success" and three times after a "Logout".
Since I have found out that four out of these five invocations
do not provide a sensible argument (and do not expect a sensible
answer), my functions look thusly:
function _prefs_hook_fullname($user=NULL)
{ $name = empty($user) ? '' : knu_user_data ('cn', $user);
knu_debug(__LINE__, '_prefs_hook_fullname', array($user), NULL, $name);
return $name;
}
where knu_user_data retrieves the desired detail from the session data
(and stores the user-related data there, on its 1st invocation), and
knu_debug logs a line in the Horde log, if so desired. (All locally defined
function names have that "knu_" prefix in order to avoid name clashes.)
> I thought the pref hooks were only executed on login -
> why does it look like it is being called more?
I've got no idea -- just worked around this glitch.
Good luck,
Otto Stolz
More information about the horde
mailing list