[imp] Problem using hooks
    Nikolaos Milas 
    nmilas at noa.gr
       
    Wed Apr 13 17:39:51 UTC 2011
    
    
  
Hello,
I have installed Horde Webmail 1.2.9 accessing my IMAP server (Dovecot 
1.2.16 with LDAP backend) and it works.
However, from_addr and fullname fields are blank when composing a new 
email (unless user defines them explicitly in preferences).
So, in order to have the above fields pre-populated (to make the 
environment more user-friendly to new users), I have tried to use hooks 
to access our LDAP server and read mail and cn fields directly and I 
have changed horde/config/prefs.php as follows (that is, I have added: 
'hook' => true,):
    $_prefs['fullname'] = array(
         'value' => '',
         'locked' => false,
         'shared' => true,
         'type' => 'text',
         'hook' => true,
         'desc' => _("Your full name:")
    );
    $_prefs['from_addr'] = array(
         'value' => '',
         'locked' => false,
         'shared' => true,
         'type' => 'text',
         'hook' => true,
         'desc' =>  _("Your From: address:")
    );
and I have modified / uncommented the respective functions in 
/config/hooks.php accordingly:
    function _prefs_hook_fullname($user = null)
    function _prefs_hook_from_addr($user = null)
However, nothing changes; it seems as if hooks are not being observed. I 
have even tried to run called functions without the @ prefix, to see any 
error logging, but I don't see any errors whatsoever.
I also tried to use:
    $_prefs['from_addr'] = array(
    //    'value' => '',
         'locked' => false,
         'shared' => true,
         'type' => 'text',
         'hook' => true,
         'desc' =>  _("Your From: address:")
    );
but still nothing changed.
What am I doing wrong? Do I need to do something more to enable the 
above hooks?
Thanks,
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5632 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/imp/attachments/20110413/6d72c792/attachment.bin>
    
    
More information about the imp
mailing list