6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/29/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7489] _prefs_hook_fullname charset problem
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..___.. .. .. . | | | |__||\ |\ / |__| | | || \| \/
Comment
> Hi, > > I'm migrating from Horde 3.1/IMP 4.1 to 3.3/4.3. We defined a hook > for fullname in horde/config/hooks.php (taken from the example): > > if (!function_exists('_prefs_hook_fullname')) { > > function _prefs_hook_fullname($user = null) > > { > > $ldapServer = 'ldap.tu-chemnitz.de'; > > $ldapPort = '389'; > > $searchBase = 'dc=tu-chemnitz, dc=de'; > > $ldapcharset = 'UTF-8'; > > $outputcharset = NLS::getCharset(); > > > > $ds = @ldap_connect($ldapServer, $ldapPort); > > > > if (is_null($user)) { > > $user = Auth::getAuth(); > > if ($user === false) > > return ''; > > } > > $searchResult = @ldap_search($ds, $searchBase, 'uid=' . $user); > > $information = @ldap_get_entries($ds, $searchResult); > > if ($information === false || $information["count"] < 1) return ''; > > if ($information[0]['displayname'][0] != '') { > > $name = $information[0]['displayname'][0]; > > } else { > > $name = $information[0]['cn'][0]; > > } > > ldap_close($ds); > > > > $name = String::convertCharset($name, $ldapcharset, $outputcharset); > > Horde::logMessage("fullname: $name, $ldapcharset, > $outputcharset", __FILE__, __LINE__, LOG_DEBUG); > > return ($name); > > # return (empty($name) ? $user : $name); > > } > > } > > > > There are problem with names containing umlauts - from the Logfile: > > > > Oct 13 11:48:12 HORDE [debug] [imp] fullname: Ottö Tcshtester, UTF-8, > UTF-8 [pid 15336 on line 192 of > "/var/www/html/horde/config/hooks.php"] > > Oct 13 11:48:12 HORDE [debug] [imp] fullname: Ottö Tcshtester, UTF-8, > UTF-8 [pid 15336 on line 192 of > "/var/www/html/horde/config/hooks.php"] > > Oct 13 11:48:12 HORDE [debug] [imp] SQL Query by Prefs_sql::store(): > INSERT INTO horde_prefs (pref_uid, pref_scope, pref_name, pref_value) > VALUES(?, ?, ?, ?), values: tcot, horde, identities, > a:1:{i:0;a:5:{s:2:"id";s:17:"Standardidentit�t";s:8:"fullname";s:12:"Ott?shtester";s:9:"from_addr";s:34:"otto.tcshtester@hrz.tu-chemnitz.de";s:10:"alias_addr";a:1:{i:0;s:23:"tcot@hrz.tu-chemnitz.de";}s:10:"default_id";s:1:"0";}} [pid 15336 on line 244 of > "/var/www/html/horde/lib/Horde/Prefs/sql.php"] > > > > The full name doesn't contain the umlaut. Setting the name via the > Webbrowser is ok - umlauts are correctly > > This function works in Horde 3.1 Do you have any idea? > > > > Thanks in advance, > > Frank > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers