@@ -132,16 +132,14 @@ public function getGroupMembers($resourceOwnerId, $groupId, $startIndex = 0, $co
132
132
133
133
$ all = ldap_get_entries ($ this ->ldapConnection , $ query );
134
134
135
- switch ($ groupsProvider ):
136
- case "posixgroup " :
137
- $ all = ldap_get_entries ($ this ->ldapConnection , $ query );
138
- // we are only interested in group memberuid array
139
- $ attributes = $ all [0 ];
140
- break ;
141
-
142
- default :
143
- break ;
144
- endswitch ;
135
+ switch ($ groupsProvider ) {
136
+ case "posixgroup " :
137
+ // we are only interested in group memberuid array
138
+ $ attributes = $ all [0 ];
139
+ break ;
140
+ default :
141
+ break ;
142
+ }
145
143
146
144
$ entry = @ldap_first_entry ($ this ->ldapConnection , $ query );
147
145
if (false === $ entry ) {
@@ -158,15 +156,15 @@ public function getGroupMembers($resourceOwnerId, $groupId, $startIndex = 0, $co
158
156
for ($ i = 0 ; $ i < $ attributes [$ memberAttribute ]["count " ]; $ i ++) {
159
157
// member DN
160
158
// fetch attributes for this particular user
161
- switch ($ groupsProvider ):
162
- case "posixgroup " :
163
- $ user_dn = 'uid= ' . $ attributes [$ memberAttribute ][$ i ] . ', ' . $ this ->config ->s ('LdapVootStorage ' )->l ('peopleDn ' );
164
- $ userAttributes = $ this ->getUserAttributesByDn ($ user_dn );
165
- break ;
166
- default :
167
- $ userAttributes = $ this ->getUserAttributesByDn ($ attributes [$ memberAttribute ][$ i ]);
168
- break ;
169
- endswitch ;
159
+ switch ($ groupsProvider ) {
160
+ case "posixgroup " :
161
+ $ user_dn = 'uid= ' . $ attributes [$ memberAttribute ][$ i ] . ', ' . $ this ->config ->s ('LdapVootStorage ' )->l ('peopleDn ' );
162
+ $ userAttributes = $ this ->getUserAttributesByDn ($ user_dn );
163
+ break ;
164
+ default :
165
+ $ userAttributes = $ this ->getUserAttributesByDn ($ attributes [$ memberAttribute ][$ i ]);
166
+ break ;
167
+ }
170
168
171
169
$ userAttributes ['voot_membership_role ' ] = "member " ;
172
170
array_push ($ data , $ userAttributes );
@@ -195,14 +193,14 @@ public function isMemberOf($resourceOwnerId, $startIndex = null, $count = null)
195
193
$ groupsProvider = $ this ->config ->s ('LdapVootStorage ' )->l ('groupsProvider ' );
196
194
197
195
/* get the groups the user is a member of */
198
- switch ($ groupsProvider ):
199
- case "posixgroup " :
200
- $ filter = '( ' . $ this ->config ->s ('LdapVootStorage ' )->l ('memberAttribute ' ) . '= ' . $ resourceOwnerId . ') ' ;
201
- break ;
202
- default :
203
- $ filter = '( ' . $ this ->config ->s ('LdapVootStorage ' )->l ('memberAttribute ' ) . '= ' . $ userDn . ') ' ;
204
- break ;
205
- endswitch ;
196
+ switch ($ groupsProvider ) {
197
+ case "posixgroup " :
198
+ $ filter = '( ' . $ this ->config ->s ('LdapVootStorage ' )->l ('memberAttribute ' ) . '= ' . $ resourceOwnerId . ') ' ;
199
+ break ;
200
+ default :
201
+ $ filter = '( ' . $ this ->config ->s ('LdapVootStorage ' )->l ('memberAttribute ' ) . '= ' . $ userDn . ') ' ;
202
+ break ;
203
+ }
206
204
207
205
$ query = @ldap_search ($ this ->ldapConnection , $ this ->config ->s ('LdapVootStorage ' )->l ('groupDn ' ), $ filter );
208
206
if (false === $ query ) {
0 commit comments