From 02ba0ab70547c25aee052744d170a20c440df6bb Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 20 Nov 2006 04:10:02 +0000 Subject: [PATCH] Added missing getCn function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5155 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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: -- 2.30.2