[horde] pb with hook

Service Informatique IF ifinfo at ujf-grenoble.fr
Wed May 14 14:36:46 UTC 2014


> ----------------------
>
> Message: 2
> Date: Fri, 25 Apr 2014 11:41:16 -0300
> From: "Mauricio Jose T. Tecles"<mtecles at biof.ufrj.br>
> To:horde at lists.horde.org
> Subject: Re: [horde] pb with hook
> Message-ID:<20140425114116.17741fcz5wj113bg at webmail.biof.ufrj.br>
> Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed"
>
> ----- Mensagem deifinfo 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

Thank you, it works perfectly
(this is the right doc : http://wiki.horde.org/LDAPHooksHorde5 )

Simon

>
>> >
>>>>> >>>>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 Projecthttp://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
>> >


-- 
Simon Chevance
--------------------------------------------------------------
Service Informatique
Institut Fourier - UMR CNRS 5582 Université Grenoble I
100 rue des Maths,
38402 Saint Martin d'Hères
Tel : 0476635655 Fax : 0476514478
--------------------------------------------------------------




More information about the horde mailing list