[horde] storing from addresses in session/preferences

Michael J Rubinsky mrubinsk at horde.org
Mon Jul 11 14:09:25 UTC 2011


Quoting Matus UHLAR - fantomas <uhlar at fantomas.sk>:

>>>> Zitat von Matus UHLAR - fantomas <uhlar at fantomas.sk>:
>>>>> Is there any (easy) way to put the array to preferences?
>
>>> On 05.07.11 10:09, Jan Schneider wrote:
>>>> Sorry?
>
>> Zitat von Matus UHLAR - fantomas <uhlar at fantomas.sk>:
>>> (how) can I put the variable to horde's preferences and access it  
>>> from both ingo and imp?
>
> On 05.07.11 14:18, Jan Schneider wrote:
>> I'm still not sure what you mean, but any Horde preference can be  
>> accessed from an application.
>
> well, that's it: how can I access users' preferences from PHP application?
> (either a hook or horde/prefs.php)

$GLOBALS['prefs']->getValue('pref_name');
$GLOBALS['prefs']->setValue('pref_name', $prefValue);

> I have an array in PHP (list of e-mail addresses), how can I store  
> it into users' preferences?  How can I access it later?

You can't just store arbitrary values in pref storage. If you want to  
store a new user pref that does not already exist in stock Horde, you  
need to add that pref to either horde/config/prefs.local.php or  
{application}/config/prefs.local.php. See the application's prefs.php  
file for the format of the pref configuration.

>
> pardon my ignorrance - if this is documented somewhere, possibly  
> with a working example, I will try to read it.

Pretty sure there is some basic information about the prefs system on  
the wiki. http://wiki.horde.org

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org



More information about the horde mailing list