{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/impersonate/issues/5","labels_url":"https://api.github.com/repos/owncloud/impersonate/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/impersonate/issues/5/comments","events_url":"https://api.github.com/repos/owncloud/impersonate/issues/5/events","html_url":"https://github.com/owncloud/impersonate/issues/5","id":115485640,"number":5,"title":"Doesn't work with LDAP users.","user":{"login":"Zappatron","id":10867924,"avatar_url":"https://avatars.githubusercontent.com/u/10867924?v=3","gravatar_id":"","url":"https://api.github.com/users/Zappatron","html_url":"https://github.com/Zappatron","followers_url":"https://api.github.com/users/Zappatron/followers","following_url":"https://api.github.com/users/Zappatron/following{/other_user}","gists_url":"https://api.github.com/users/Zappatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Zappatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zappatron/subscriptions","organizations_url":"https://api.github.com/users/Zappatron/orgs","repos_url":"https://api.github.com/users/Zappatron/repos","events_url":"https://api.github.com/users/Zappatron/events{/privacy}","received_events_url":"https://api.github.com/users/Zappatron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-06T11:13:43Z","updated_at":"2015-11-06T11:26:04Z","closed_at":null,"body":"Impersonate doesn't work here (8.1.3) with LDAP users, using the guid or LDAP user name.\r\n\r\nThis would be a very useful feature!\r\n\r\nCheers\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/impersonate/issues/comments/154386438","html_url":"https://github.com/owncloud/impersonate/issues/5#issuecomment-154386438","issue_url":"https://api.github.com/repos/owncloud/impersonate/issues/5","id":154386438,"user":{"login":"Zappatron","id":10867924,"avatar_url":"https://avatars.githubusercontent.com/u/10867924?v=3","gravatar_id":"","url":"https://api.github.com/users/Zappatron","html_url":"https://github.com/Zappatron","followers_url":"https://api.github.com/users/Zappatron/followers","following_url":"https://api.github.com/users/Zappatron/following{/other_user}","gists_url":"https://api.github.com/users/Zappatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Zappatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zappatron/subscriptions","organizations_url":"https://api.github.com/users/Zappatron/orgs","repos_url":"https://api.github.com/users/Zappatron/repos","events_url":"https://api.github.com/users/Zappatron/events{/privacy}","received_events_url":"https://api.github.com/users/Zappatron/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T11:26:04Z","updated_at":"2015-11-06T11:26:04Z","body":"I changed the impersonate function like so:\r\n\r\n        public function impersonate($userid) {\r\n                $users = $this->userManager->searchDisplayName($userid, 1, 0);\r\n                if (count($users) > 0) {\r\n                        $user = array_shift($users);\r\n                        if (strcasecmp($user->getDisplayName(),$userid) === 0) {\r\n                                $this->userSession->setUser($user);\r\n                        }\r\n                }\r\n                return new JSONResponse();\r\n        }\r\n\r\nAnd it seems to work fine, using Display Name instead of User ID"}}