[horde] storing from addresses in session/preferences
jan at horde.org
Tue Jul 5 08:09:06 UTC 2011
Zitat von Matus UHLAR - fantomas <uhlar at fantomas.sk>:
>> Zitat von Matus UHLAR - fantomas <uhlar at fantomas.sk>:
>>> Both horde and ingo support hook functions to fetch those addresses
>>> - _prefs_hook_from_addr defined in config/hooks.php
>>> - _ingo_hook_vacation_addresses in ingo/config/hooks.php
>>> Since a problem mentioned here some time ago, I fetch those
>>> addresses in prefs.php too.
>>> However all these functions are called more times when an user is
>>> logged in and I would like to prevent repeated fetching of those
>>> (they are fetched from different source)
>>> - can I simply store the from_addreses to $_SESSION and expect
>>> the addresses will be preserved across session?
> On 01.07.11 18:04, Jan Schneider wrote:
>> Not across sessions. But during that session.
> Oh, wrong wording.
> So, would pushing the value to $_SESSION work as I expect?
Why don't you try it? Yes, it should. Though for Horde 4 you should
rather use the global $session *object*. But that's probably going to
complicate things for now.
>>> - can I store the from_addresses in preferences, so the addresses
>>> will be available in case their source is not? How to do this?
>> Probably not from a hook.
> And what about prefs.php? According to an advise, I was able to
> modify it to work with array of predefined addresses.
> Is there any (easy) way to put the array to preferences?
Do you need professional PHP or Horde consulting?
More information about the horde