[horde] fullname on IMP H3 3.2.1

fabricio bianco abreu fabricio at tc.df.gov.br
Mon Sep 18 11:58:39 PDT 2006


Hi folks,

I am trying to migrate an old horde system instalation (Horde: 2.2.3, IMP:
3.2.1. Turba: 1.2, Kronolith: 1.1, Nag: 1.1) to a brand new server, runnig
current horde applications:

# Horde: 3.1.3
# Imp: H3 (4.1.3) (run Imp tests)
# Ingo: H3 (1.1.1) (run Ingo tests)
# Passwd: H3 (3.0) (run Passwd tests)
# Turba: H3 (2.1.2)

I am having troube to set up IMP (the reason why I am posting this message HERE
is because I believe the solution resides on horde hooks.

Users are to have a single identity. 

When composing a message their full name should show along their e-mail address
on the locked "from" field. I have not suceeded to do so. Only their e-mail
addres are shown.

Users information are stored on a remote LDAP server. The command bellow returns
some_user's fullname.

$ ldapsearch -x -h marte2.tcdf.net -b ou=Users,dc=tcdf,dc=net uid=some_user |
grep cn
$ cn: some_user full name

I have locked "default_identity", "id", "fullname", "from_addr" options on
horde/config/prefs.php.

I have a _prefs_hook_fullname function defined on horde/config/hooks.conf

 if (!function_exists('_prefs_hook_fullname')) {
     function _prefs_hook_fullname($user = null)
     {
         $ldapServer = 'marte2.tcdf.net';
         $ldapPort = '389';
         $searchBase = 'ou=User,dc=tcdf,dc=net';
         $ldapcharset = 'ascii'; // 'utf-8';
         $outputcharset = NLS::getCharset();

         $ds = @ldap_connect($ldapServer, $ldapPort);

         if (is_null($user)) {
             $user = Auth::getAuth();
         }
         $searchResult = @ldap_search($ds, $searchBase, 'uid=' . $user);
         $information = @ldap_get_entries($ds, $searchResult);
         $name = $information[0]['cn'][0];

         ldap_close($ds);

         $name = String::convertCharset($name, $ldapcharset, $outputcharset);
         return (empty($name) ? $user : $name);
     }
 }


Unfortunatelly I am not an php programmer and do not to know how to debug it.

What am I missing?

Thanks in advance. Best regards,
________________________________________________________________

                     Fabricio Bianco Abreu 




More information about the horde mailing list