Skip to content

Commit

Permalink
Merge pull request #3 from vedosis/master
Browse files Browse the repository at this point in the history
Empty group blowout fix.
  • Loading branch information
ztec committed Mar 14, 2013
2 parents 64b079f + a2dcf0d commit 95fc27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Security/User/adUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function fetchData(adUser $adUser, adLDAP $adLdap){
$groups = array();
//$allGroups = $adLdap->search_groups(ADLDAP_SECURITY_GLOBAL_GROUP,true);
foreach($user->memberOf as $k=>$group){
if($k !== 'count'){
if($k !== 'count' && $group){
$reg = '#CN=([^,]*)#' ;
preg_match_all($reg,$group,$out);
$groups[] = $out[1][0] ;
Expand Down

0 comments on commit 95fc27c

Please sign in to comment.