{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/13426","labels_url":"https://api.github.com/repos/owncloud/core/issues/13426/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/13426/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/13426/events","html_url":"https://github.com/owncloud/core/issues/13426","id":54614603,"number":13426,"title":"LDAP - user in multiple groups not working","user":{"login":"PeteSSS","id":10565363,"avatar_url":"https://avatars.githubusercontent.com/u/10565363?v=3","gravatar_id":"","url":"https://api.github.com/users/PeteSSS","html_url":"https://github.com/PeteSSS","followers_url":"https://api.github.com/users/PeteSSS/followers","following_url":"https://api.github.com/users/PeteSSS/following{/other_user}","gists_url":"https://api.github.com/users/PeteSSS/gists{/gist_id}","starred_url":"https://api.github.com/users/PeteSSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeteSSS/subscriptions","organizations_url":"https://api.github.com/users/PeteSSS/orgs","repos_url":"https://api.github.com/users/PeteSSS/repos","events_url":"https://api.github.com/users/PeteSSS/events{/privacy}","received_events_url":"https://api.github.com/users/PeteSSS/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/app%3Auser_ldap","name":"app:user_ldap","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-16T19:27:13Z","updated_at":"2015-01-20T11:03:15Z","closed_at":null,"body":"### Steps to reproduce\r\nUsers are member of multiple groups\r\n\r\n### Expected behaviour\r\nIn user backend the groups per member should be ticked for all valid groups\r\n\r\n### Actual behaviour\r\nIf a user is member of multiple groups the backend lists random memberships: valid groups but not all. There are side effects in different apps (e.g. calendar via caldav not synchronizing for shared calendars)\r\n\r\n### Causes\r\nI have located the bug in file group_ldap.php \r\n```php\r\n\tprivate function getGroupsByMember($dn, &$seen = null) {\r\n...\r\n\t\t$groups = $this->access->fetchListOfGroups($filter,\r\n\t\t\tarray($this->access->connection->ldapGroupDisplayName, 'dn'));\r\n\r\n}\r\n```\r\n\r\nfunction fetchListOfGroups in lib/access.php expects as 3rd parameter a $limit (set to null by default)\r\n\r\n### Workaround (Bugfix?)\r\nI have set that parameter to 500 and the user list and the group memberships are populated as expected.\r\n\r\n```php\r\n\t\t$groups = $this->access->fetchListOfGroups($filter,\r\n\t\t\tarray($this->access->connection->ldapGroupDisplayName, 'dn'), 500);\r\n```\r\n\r\nThere might be more $limit parameters not set to valid values or left as null."},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/70637525","html_url":"https://github.com/owncloud/core/issues/13426#issuecomment-70637525","issue_url":"https://api.github.com/repos/owncloud/core/issues/13426","id":70637525,"user":{"login":"flattermann","id":566680,"avatar_url":"https://avatars.githubusercontent.com/u/566680?v=3","gravatar_id":"","url":"https://api.github.com/users/flattermann","html_url":"https://github.com/flattermann","followers_url":"https://api.github.com/users/flattermann/followers","following_url":"https://api.github.com/users/flattermann/following{/other_user}","gists_url":"https://api.github.com/users/flattermann/gists{/gist_id}","starred_url":"https://api.github.com/users/flattermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flattermann/subscriptions","organizations_url":"https://api.github.com/users/flattermann/orgs","repos_url":"https://api.github.com/users/flattermann/repos","events_url":"https://api.github.com/users/flattermann/events{/privacy}","received_events_url":"https://api.github.com/users/flattermann/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T11:03:15Z","updated_at":"2015-01-20T11:03:15Z","body":"@PeteSSS \r\nThanks, the workaround works fine!\r\nMy users are now able to access their shared calendars again..."}}