Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
98d3111c
Commit
98d3111c
authored
Nov 10, 2015
by
C. Montero Luque
Browse files
Merge pull request #20124 from owncloud/postscriptum-20093
remove uselessly used parameter, read all user attributes also when l…
parents
dd153a56
133e3fe8
Changes
2
Show whitespace changes
Inline
Side-by-side
apps/user_ldap/group_ldap.php
View file @
98d3111c
...
...
@@ -553,6 +553,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
$groupUsers
=
array
();
$isMemberUid
=
(
strtolower
(
$this
->
access
->
connection
->
ldapGroupMemberAssocAttr
)
===
'memberuid'
);
$attrs
=
$this
->
access
->
userManager
->
getAttributes
(
true
);
foreach
(
$members
as
$member
)
{
if
(
$isMemberUid
)
{
//we got uids, need to get their DNs to 'translate' them to user names
...
...
@@ -560,11 +561,11 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
str_replace
(
'%uid'
,
$member
,
$this
->
access
->
connection
->
ldapLoginFilter
),
$this
->
access
->
getFilterPartForUserSearch
(
$search
)
));
$ldap_users
=
$this
->
access
->
fetchListOfUsers
(
$filter
,
'dn'
);
$ldap_users
=
$this
->
access
->
fetchListOfUsers
(
$filter
,
$attrs
,
1
);
if
(
count
(
$ldap_users
)
<
1
)
{
continue
;
}
$groupUsers
[]
=
$this
->
access
->
dn2username
(
$ldap_users
[
0
]);
$groupUsers
[]
=
$this
->
access
->
dn2username
(
$ldap_users
[
0
]
[
'dn'
][
0
]
);
}
else
{
//we got DNs, check if we need to filter by search or we can give back all of them
if
(
!
empty
(
$search
))
{
...
...
apps/user_ldap/lib/access.php
View file @
98d3111c
...
...
@@ -706,9 +706,8 @@ class Access extends LDAPUtility implements user\IUserTools {
* @param array $ldapRecords
*/
public
function
batchApplyUserAttributes
(
array
$ldapRecords
){
$displayNameAttribute
=
strtolower
(
$this
->
connection
->
ldapUserDisplayName
);
foreach
(
$ldapRecords
as
$userRecord
)
{
$ocName
=
$this
->
dn2ocname
(
$userRecord
[
'dn'
][
0
]
,
$userRecord
[
$displayNameAttribute
]
);
$ocName
=
$this
->
dn2ocname
(
$userRecord
[
'dn'
][
0
]);
$this
->
cacheUserExists
(
$ocName
);
$user
=
$this
->
userManager
->
get
(
$ocName
);
if
(
$user
instanceof
OfflineUser
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment