[horde] Sharing user information between hooks

Jens Wahnes wahnes at uni-koeln.de
Fri Oct 2 09:58:41 UTC 2015


To customize the user experience, we are using hooks in our Horde
installation.  Among others, we are using preauth-Hooks both within the
"horde" scope (.../config/hooks.php) and within the "imp" scope
(.../imp/config/hooks.php).  So far, these hooks work completely
independent from each other.  However, we would like to change that and
access information that has been generated by Horde's preauth hook from
within IMP's preauth hook.  What is the best way to share such
information between these hooks?  Should I add some key-value pair to
the user's session?  If so, how should I go about that?  Should I use
PHP's $_SESSION variable?  Or is there a preferred way to do that
through some interface the Horde framework provides?

BTW, another thing I noticed with the last "pear upgrade" is that the
.../imp/config/hooks.php file gets overwritten.  This applies to IMP's
hooks.php only - it does not happen with Horde's hooks
(.../config/hooks.php).  Is that on purpose or is it a bug?


Jens


More information about the horde mailing list