[horde] pb with hook

Service Informatique IF ifinfo at ujf-grenoble.fr
Fri Apr 25 13:27:41 UTC 2014


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

>> >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



More information about the horde mailing list