[horde] fullname on IMP H3 3.2.1
fabricio bianco abreu
fabricio at tc.df.gov.br
Wed Sep 20 10:28:13 PDT 2006
> Have you activated your _prefs_hook_fullname function,
> in horde/conf/prefs.php?
What do you mean by "Have you activated your _prefs_hook_fullname function,
in horde/conf/prefs.php?"
In horde/conf/prefs.php I have:
// user full name for From: line
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
$_prefs['fullname'] = array(
'value' => '',
'locked' => true, 'shared' => true,
'type' => 'text',
'desc' => _("Your full name:")
);
In horde/conf/hooks.php I have:
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);
}
}
What am I missing?
By the way, I am using _username_hook_frombackend and _username_hook_tobackend
so that upon login, on horde panel users are greeted with the message "Welcome,
user at mydomain". Does it intefere with IMP's from field when composing a message?
Thanks in advance,
More information about the horde
mailing list