[horde] Creating a prefs_change replyto_addr hook

Michael M Slusarz slusarz at horde.org
Mon Apr 7 21:40:05 UTC 2014


Please don't top-post.

Quoting Jarvis Bilkoh <jarvisbilkoh at gmail.com>:

> So how would I do this from a hook on a preference change if "prefs_change"
> is only for prefs.php?

You watch for changes to 'identities' pref.

> The best way to access/modify this setting would be using getValue and
> setValue from below correct?
>
> http://dev.horde.org/api/master/app/imp/classes/IMP_Prefs_Identity.html

Yes.

> On Thu, Apr 3, 2014 at 5:46 PM, Michael M Slusarz <slusarz at horde.org> wrote:
>
>> Quoting Jarvis Bilkoh <jarvisbilkoh at gmail.com>:
>>
>>  I want to make sure the user can't change the replyto_addr outside a
>>> domain
>>> list. I've tried creating a pref_change entry to make this happen.
>>> Unfortunately, it doesn't seem to call it.
>>>
>>> $_prefs['prefs_change']['hook'] = true;
>>>
>>>     public function prefs_change($pref)
>>>     {
>>>         switch ($pref) {
>>>         case 'replyto_addr':
>>>             Horde::log('This is where Reply-To is changed.', 'INFO');
>>>             break;
>>>         }
>>>     }
>>>
>>
>> The 'replyto_addr' information is saved in the 'identities' preference, so
>> that's the preference you need to check for.  (The 'replyto_addr' entry in
>> prefs.php exists only to provide locked/default information).
>>
>> michael
>>
>> ___________________________________
>> Michael Slusarz [slusarz at horde.org]
>>
>> --
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org



___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list