Created
February 1, 2018 15:21
-
-
Save janmayer/6b19a877bc4a833dae33fafe5d6f4086 to your computer and use it in GitHub Desktop.
For typo3 ig_ldap_sso_auth, add the primary usergroup from gidnumber to memberOf ldapgroups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/Classes/Library/Authentication.php | |
+++ b/Classes/Library/Authentication.php | |
@@ -456,6 +456,9 @@ | |
!(bool)static::$config['GroupsNotSynchronize'], | |
$ldapInstance | |
); | |
+ $primaryGroup = $ldapInstance->search(static::$config['groups']['basedn'], '(&(gidnumber='.$ldapUser['gidnumber'][0].')(objectClass=posixGroup))', $ldapGroupAttributes); | |
+ $ldapGroups[] = $primaryGroup[0]; | |
+ $ldapGroups['count']++; | |
} | |
} else { | |
// Get LDAP groups from DN of user. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment