[imp] from_addr problem
Jan Schneider
jan at horde.org
Tue Apr 18 01:29:08 PDT 2006
Zitat von Thomas GRATTON <thomas.gratton at ac-amiens.fr>:
> Hello guys,
>
> I tried the new horde 3.1.1 & IMP 4.1.1 yesterday, all works fine
> except one thing.
> The function that get the true email adress in my openLDAP directory,
> from the uid, doesn't work (but worked fine with an other horde 3.x &
> IMP 4.x versions).
>
> ---[ horde/conf/hooks.php ]---
>
> if (!function_exists('_prefs_hook_from_addr')) {
> function _prefs_hook_from_addr($name = null)
> {
> if (is_null($name)) {
> $name = Auth::getAuth();
> }
> if (!empty($name)) {
> $uid = Auth::getAuth();
> $cmd = "ldapsearch -LLL -x -u -b 'dc=mydomain,dc=com'
> 'uid=".$uid."' mail | grep mail";
> $mails = `$cmd`;
> $mail_array = explode(":", $mails);
> $mail = $mail_array['1'];
>
> return (empty($mail) ? '' : $mail);
> }
>
> return '';
> }
> }
> -----------
>
> The horde/prefs.conf contains the call of this function :
>
> -----------
> $_prefs['from_addr'] = array(
> 'value' => '',
> 'locked' => false,
> 'shared' => true,
> 'type' => 'text',
> 'hook' => true,
> 'desc' => _("Your From: address:")
> );
> -----------
Is the hook called at all, i.e. is the hook no longer working, or is
it not called?
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the imp
mailing list