Thread:Extension talk:LDAP Authentication/$wgLDAPGroupsUseMemberOf - bug in LDAPAuthentication.php

I was trying to use $wgLDAPGroupsUseMemberOf to pull out "Wiki Sysop" for a user in an 2008 AD.

Found that in "function getGroups( $username)" in LDAPAuthentication.php the code only set the $groups["dn"] not the $groups["short"]. The verification for LDAP users in hasLDAPGroup and isLDAPGroup uses $this->userLDAPGroups["short"] and fails.

I Did an ugly workaround to make it work in the foor loop after "if ( isset( $wgLDAPGroupsUseMemberOf[$_SESSION['wsDomain']] ) && $wgLDAPGroupsUseMemberOf[$_SESSION['wsDomain']] ) {"

$groups = array( "dn"=> array, "short"=>array ); foreach( $memberOfMembers as $mem ) { // ugly workaround ADDED to create short from DN         $Gr =explode(",", strtolower($mem));  // Separeate the different answers, GroupName in  $Gr[0] $Grp = explode("=",$Gr[0]);          // Remove the stuff beforer the = sign array_push( $groups["short"], $Grp[1] );  //Groupname in $Grp[1] // END OF ADD array_push( $groups["dn"], strtolower( $mem ) ) } $this->userLDAPGroups = $groups;