From: hickert Date: Mon, 20 Nov 2006 04:10:02 +0000 (+0000) Subject: Added missing getCn function X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=02ba0ab70547c25aee052744d170a20c440df6bb;p=gosa.git Added missing getCn function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5155 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 7abac71be..1e086ecb5 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1217,6 +1217,19 @@ class LDAP{ } } } + + /* added by Guido Serra aka Zeph */ + function getCn($dn){ + $simple= split(",", $dn); + + foreach($simple as $piece) { + $partial= split("=", $piece); + + if($partial[0] == "cn"){ + return $partial[1]; + } + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: