[cvs] [Wiki] changed: CustomizingPreferences
Matt Selsky
selsky at columbia.edu
Wed May 31 13:51:28 PDT 2006
selsky Wed, 31 May 2006 13:51:28 -0700
Modified page: https://dev.horde.org/horde/wicked/CustomizingPreferences
New Revision: 2.0
Change log: Only show the first CN for LDAP entries
@@ -319,8 +319,27 @@
}
</code>
David Komanek
+-----
+
+To make sure only the first name listed in LDAP shows up for people with multiple names (the user has more than one CN):
+
+<code type="php">
+if (!function_exists('_turba_hook_decode_name')) {
+ function _turba_hook_decode_name($attribute, $turbaObject)
+ {
+ if (!is_a($turbaObject->driver, 'Turba_Driver_ldap')) {
+ return $attribute;
+ }
+
+ // Return the first name in LDAP
+ $names = explode(', ', $attribute);
+ return $names[0];
+ }
+}
+</code>
+
-----
add your customizations here...
More information about the cvs
mailing list