{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/60787865","id":60787865,"diff_hunk":"@@ -183,6 +184,70 @@ public function getDomainFromURL($url) {\n \n \t\treturn $domain;\n \t}\n+\t\n+\t/**\n+\t *\n+\t * Set the LDAPProvider in the config\n+\t *\n+\t */\n+\tpublic function setLDAPProvider() {\n+\t\t$current = \\OC::$server->getConfig()->getSystemValue('ldapProviderFactory', null);\n+\t\tif(is_null($current)) {\n+\t\t\t\\OC::$server->getConfig()->setSystemValue('ldapProviderFactory', '\\\\OCA\\\\user_ldap\\\\lib\\\\LDAPProviderFactory');\n+\t\t}\n+\t}\n+\t\n+\t/**\n+\t * sanitizes a DN received from the LDAP server\n+\t * @param array $dn the DN in question\n+\t * @return array the sanitized DN\n+\t */\n+\tpublic function sanitizeDN($dn) {\n+\t\t//treating multiple base DNs\n+\t\tif(is_array($dn)) {\n+\t\t\t$result = array();\n+\t\t\tforeach($dn as $singleDN) {\n+\t\t\t\t$result[] = self::sanitizeDN($singleDN);","path":"apps/user_ldap/lib/helper.php","position":35,"original_position":35,"commit_id":"3eaa6e57672759f1381aca6ddd7102f3824040db","original_commit_id":"3eaa6e57672759f1381aca6ddd7102f3824040db","user":{"login":"blizzz","id":2184312,"avatar_url":"https://avatars.githubusercontent.com/u/2184312?v=3","gravatar_id":"","url":"https://api.github.com/users/blizzz","html_url":"https://github.com/blizzz","followers_url":"https://api.github.com/users/blizzz/followers","following_url":"https://api.github.com/users/blizzz/following{/other_user}","gists_url":"https://api.github.com/users/blizzz/gists{/gist_id}","starred_url":"https://api.github.com/users/blizzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blizzz/subscriptions","organizations_url":"https://api.github.com/users/blizzz/orgs","repos_url":"https://api.github.com/users/blizzz/repos","events_url":"https://api.github.com/users/blizzz/events{/privacy}","received_events_url":"https://api.github.com/users/blizzz/received_events","type":"User","site_admin":false},"body":"$this->","created_at":"2016-04-22T19:03:15Z","updated_at":"2016-04-22T19:03:15Z","html_url":"https://github.com/owncloud/core/pull/23992#discussion_r60787865","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/23992","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/60787865"},"html":{"href":"https://github.com/owncloud/core/pull/23992#discussion_r60787865"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/23992"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/23992","id":66455281,"html_url":"https://github.com/owncloud/core/pull/23992","diff_url":"https://github.com/owncloud/core/pull/23992.diff","patch_url":"https://github.com/owncloud/core/pull/23992.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/23992","number":23992,"state":"open","locked":false,"title":"New LDAPProvider for user_ldap","user":{"login":"GitHubUser4234","id":16538178,"avatar_url":"https://avatars.githubusercontent.com/u/16538178?v=3","gravatar_id":"","url":"https://api.github.com/users/GitHubUser4234","html_url":"https://github.com/GitHubUser4234","followers_url":"https://api.github.com/users/GitHubUser4234/followers","following_url":"https://api.github.com/users/GitHubUser4234/following{/other_user}","gists_url":"https://api.github.com/users/GitHubUser4234/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubUser4234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubUser4234/subscriptions","organizations_url":"https://api.github.com/users/GitHubUser4234/orgs","repos_url":"https://api.github.com/users/GitHubUser4234/repos","events_url":"https://api.github.com/users/GitHubUser4234/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubUser4234/received_events","type":"User","site_admin":false},"body":"New LDAPProvider for user_ldap, please refer to #23855","created_at":"2016-04-14T09:40:28Z","updated_at":"2016-04-22T19:03:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0c83f588a2474f79a49807b18d4db1d1792885c","assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/62","html_url":"https://github.com/owncloud/core/milestones/9.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/62/labels","id":1322460,"number":62,"title":"9.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":731,"closed_issues":557,"state":"open","created_at":"2015-09-24T16:30:14Z","updated_at":"2016-04-22T18:50:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/owncloud/core/pulls/23992/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/23992/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/23992/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/3eaa6e57672759f1381aca6ddd7102f3824040db","head":{"label":"GitHubUser4234:master","ref":"master","sha":"3eaa6e57672759f1381aca6ddd7102f3824040db","user":{"login":"GitHubUser4234","id":16538178,"avatar_url":"https://avatars.githubusercontent.com/u/16538178?v=3","gravatar_id":"","url":"https://api.github.com/users/GitHubUser4234","html_url":"https://github.com/GitHubUser4234","followers_url":"https://api.github.com/users/GitHubUser4234/followers","following_url":"https://api.github.com/users/GitHubUser4234/following{/other_user}","gists_url":"https://api.github.com/users/GitHubUser4234/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubUser4234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubUser4234/subscriptions","organizations_url":"https://api.github.com/users/GitHubUser4234/orgs","repos_url":"https://api.github.com/users/GitHubUser4234/repos","events_url":"https://api.github.com/users/GitHubUser4234/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubUser4234/received_events","type":"User","site_admin":false},"repo":{"id":50913275,"name":"core","full_name":"GitHubUser4234/core","owner":{"login":"GitHubUser4234","id":16538178,"avatar_url":"https://avatars.githubusercontent.com/u/16538178?v=3","gravatar_id":"","url":"https://api.github.com/users/GitHubUser4234","html_url":"https://github.com/GitHubUser4234","followers_url":"https://api.github.com/users/GitHubUser4234/followers","following_url":"https://api.github.com/users/GitHubUser4234/following{/other_user}","gists_url":"https://api.github.com/users/GitHubUser4234/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubUser4234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubUser4234/subscriptions","organizations_url":"https://api.github.com/users/GitHubUser4234/orgs","repos_url":"https://api.github.com/users/GitHubUser4234/repos","events_url":"https://api.github.com/users/GitHubUser4234/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubUser4234/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GitHubUser4234/core","description":"The ownCloud core","fork":true,"url":"https://api.github.com/repos/GitHubUser4234/core","forks_url":"https://api.github.com/repos/GitHubUser4234/core/forks","keys_url":"https://api.github.com/repos/GitHubUser4234/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GitHubUser4234/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GitHubUser4234/core/teams","hooks_url":"https://api.github.com/repos/GitHubUser4234/core/hooks","issue_events_url":"https://api.github.com/repos/GitHubUser4234/core/issues/events{/number}","events_url":"https://api.github.com/repos/GitHubUser4234/core/events","assignees_url":"https://api.github.com/repos/GitHubUser4234/core/assignees{/user}","branches_url":"https://api.github.com/repos/GitHubUser4234/core/branches{/branch}","tags_url":"https://api.github.com/repos/GitHubUser4234/core/tags","blobs_url":"https://api.github.com/repos/GitHubUser4234/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GitHubUser4234/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GitHubUser4234/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/GitHubUser4234/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GitHubUser4234/core/statuses/{sha}","languages_url":"https://api.github.com/repos/GitHubUser4234/core/languages","stargazers_url":"https://api.github.com/repos/GitHubUser4234/core/stargazers","contributors_url":"https://api.github.com/repos/GitHubUser4234/core/contributors","subscribers_url":"https://api.github.com/repos/GitHubUser4234/core/subscribers","subscription_url":"https://api.github.com/repos/GitHubUser4234/core/subscription","commits_url":"https://api.github.com/repos/GitHubUser4234/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/GitHubUser4234/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/GitHubUser4234/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/GitHubUser4234/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/GitHubUser4234/core/contents/{+path}","compare_url":"https://api.github.com/repos/GitHubUser4234/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GitHubUser4234/core/merges","archive_url":"https://api.github.com/repos/GitHubUser4234/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GitHubUser4234/core/downloads","issues_url":"https://api.github.com/repos/GitHubUser4234/core/issues{/number}","pulls_url":"https://api.github.com/repos/GitHubUser4234/core/pulls{/number}","milestones_url":"https://api.github.com/repos/GitHubUser4234/core/milestones{/number}","notifications_url":"https://api.github.com/repos/GitHubUser4234/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GitHubUser4234/core/labels{/name}","releases_url":"https://api.github.com/repos/GitHubUser4234/core/releases{/id}","deployments_url":"https://api.github.com/repos/GitHubUser4234/core/deployments","created_at":"2016-02-02T10:34:25Z","updated_at":"2016-02-02T10:34:40Z","pushed_at":"2016-04-22T08:01:08Z","git_url":"git://github.com/GitHubUser4234/core.git","ssh_url":"git@github.com:GitHubUser4234/core.git","clone_url":"https://github.com/GitHubUser4234/core.git","svn_url":"https://github.com/GitHubUser4234/core","homepage":"https://owncloud.org/","size":196756,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"e39669171283ed191daeca50ea644de6b90e89e4","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2016-04-22T16:46:51Z","pushed_at":"2016-04-22T18:50:26Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":306199,"stargazers_count":4426,"watchers_count":4426,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1453,"mirror_url":null,"open_issues_count":1852,"forks":1453,"open_issues":1852,"watchers":4426,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/23992"},"html":{"href":"https://github.com/owncloud/core/pull/23992"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/23992"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/23992/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/23992/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/23992/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/3eaa6e57672759f1381aca6ddd7102f3824040db"}}}}