[horde] pb with hook

Mauricio Jose T. Tecles mtecles at biof.ufrj.br
Fri Apr 25 14:41:16 UTC 2014


----- Mensagem de ifinfo at ujf-grenoble.fr ---------
     Data: Fri, 25 Apr 2014 15:27:41 +0200
     De: Service Informatique IF <ifinfo at ujf-grenoble.fr>
  Assunto: Re: [horde] pb with hook
       Para: horde at lists.horde.org


> Le:
>> Message: 2
>> Date: Wed, 16 Apr 2014 15:58:57 +0200
>> From: Jan Schneider<jan at horde.org>
>> To:horde at lists.horde.org
>> Subject: Re: [horde] pb with hook
>> Message-ID:<20140416155857.Horde.yXueVdNYBFzbA99H4wzotQ1 at neo.wg.de>
>> Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes
>>
>>
>> Zitat von Service Informatique IF<ifinfo at ujf-grenoble.fr>:
>>
>>>> Hello,
>>>> I use Horde5 with the last revision get by pear
>>>>
>>>> I try to activate the example in horde/config/hooks.php
>>>>
>>>> in horde/config/prefs.d/10-webmail.php
>>>> i add :
>>>> $_prefs['from_addr']['hook'] = true;
>> Don't do this, that file will get overwritten with the next  
>> Groupware update.
> Ok, so the right way is to create another file in
>
> horde/config/prefs.d/
> but with another name like 20-if.php ?
>
> I do that
>
> and I delete all prefs for my test user in mysql database : table =  
> horde_prefs (pref_uid=test)
>
> But nothing,
>
> Thank you for helping

Try creating horde/config/hooks.local.php (as in Horde documentation).  
This way this file will not be overwritten on update.

Mauricio

>
>>>> and in horde/config/hooks.php
>>>>
>>>> <code>
>>>> class Horde_Hooks
>>>> {
>>>>     // PREFERENCES INIT: See above for documentation.
>>>>     public function prefs_init($pref, $value, $username, $scope_ob)
>>>>     {
>>>> Horde::debug($pref);
>>>>
>>>> // some dummy debug
>>>> $fileSim = fopen('/tmp/debug.txt','a+');
>>>> fwrite($fileSim,'on y est');
>>>> fclose($fileSim);
>>>> //
>>>>         switch ($pref) {
>>>>         case 'from_addr':
>>>>
>>>> Horde::debug($pref);
>>>> $fileSim = fopen('/tmp/debug.txt','a+');
>>>> fwrite($fileSim,'on y est - 2 - ');
>>>> fclose($fileSim);
>>>>
>>>> .....
>>>> </code>
>>>>
>>>> But never the file for debug is written.
>>>>
>>>> Can you help me ?
>>>>
>>>> Thank you in advance.
>>>>
>>>> PS; sorry for my english
>> from_addr is part of the identity preference and only used when
>> creating this identity for new users. Try with a fresh user, or with
>> all user preferences removed.
>>
>> -- Jan Schneider The Horde Project http://www.horde.org/  
>> https://www.facebook.com/hordeproject
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>


----- Final da mensagem de ifinfo at ujf-grenoble.fr -----



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the horde mailing list