Zitat von Marco <[email protected]>:
Jan Schneider <jan <at> horde.org> writes:Zitat von Marco <falon <at> csi.it>: > Hi, > I explain in particular what I would like. > I need an hook that set, after login, the IMP configuration variable > $conf['compose']['link_attachments']. > > I tried with: > > if (!function_exists('_imp_hook_postlogin')) { > function _imp_hook_postlogin($actionID, $isLogin) > { > global $registry; > > > $GLOBALS['registry']->_confCache['imp']['compose']['link_attachments'] = > true; > > return true; > } > }[...]> Could you show me how to set this value? Setting $GLOBALS['conf'].... didn't do it?No, it didn't work. Something rewrite this setting after. I also tried with horde hook authenticate: if (!function_exists('_horde_hook_postauthenticate')) { function _horde_hook_postauthenticate($userID, $credential, $realm) { $GLOBALS['conf']['compose']['link_attachments'] = 1; return true; } } ...but it don't work.
Hm, and why don't you change it directly in the conf.php? The session is re-generated during login, so the configuration should be loaded again, because it's no longer cached in the session. This wouldn't work with the global Horde configuration, because it is loaded before the session is started, but it should work with IMP's configuration.
Other than that, the _confCache approach looks right to me. Jan. -- Do you need professional PHP or Horde consulting? http://horde.org/consulting/
pgpHXBd7GNu2R.pgp
Description: Digitale PGP-Unterschrift
-- IMP mailing list - Join the hunt: http://horde.org/bounties/#imp Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
