[horde] pb with hook
Jan Schneider
jan at horde.org
Wed Apr 16 13:58:57 UTC 2014
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.
> 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