making CN with a , inside working

a workaround to mask a , sign in a DN before CN is extracted
resolves #3533
This commit is contained in:
Vitali Kari
2016-06-13 17:25:18 +02:00
committed by GitHub
parent 779c4dee71
commit 0b30ca1071

View File

@@ -295,7 +295,9 @@ function get_dn($samaccountname) {
}
function get_cn($dn) {
dn = str_replace('\\,','~',$dn);
preg_match('/[^,]*/', $dn, $matches, PREG_OFFSET_CAPTURE, 3);
$matches[0][0] = str_replace('~',',',$matches[0][0]);
return $matches[0][0];
}