{"action":"created","comment":{"url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/comments/24644603","id":24644603,"diff_hunk":"@@ -332,8 +349,9 @@ function search_coauthors( $search_term, $post_ID ) {\n \t\t// is ridiculously slow. Investigate refactoring.\n \t\t$coauthors = array_udiff( $coauthors, $existing,\n \t\t\tfunction( $author, $existing ) {\n-\t\t\t\tif ( (int) $author->ID == (int) $existing->ID )\n+\t\t\t\tif ( (int) $author->user_nicename == (int) $existing->user_nicename ) {","path":"includes/admin-edit-ui.php","position":97,"original_position":97,"commit_id":"b3267eac8798053e7957e49b448f63a02c928128","original_commit_id":"b3267eac8798053e7957e49b448f63a02c928128","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"body":"Hm, why are you casting `user_nicename` to int?","created_at":"2015-02-13T05:02:39Z","updated_at":"2015-02-13T05:02:39Z","html_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21#discussion_r24644603","pull_request_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/comments/24644603"},"html":{"href":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21#discussion_r24644603"},"pull_request":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21","id":29169382,"html_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21","diff_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21.diff","patch_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21.patch","issue_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/21","number":21,"state":"open","locked":false,"title":"Store coauthors by user_nicename, not by ID","user":{"login":"goldenapples","id":665992,"avatar_url":"https://avatars.githubusercontent.com/u/665992?v=3","gravatar_id":"","url":"https://api.github.com/users/goldenapples","html_url":"https://github.com/goldenapples","followers_url":"https://api.github.com/users/goldenapples/followers","following_url":"https://api.github.com/users/goldenapples/following{/other_user}","gists_url":"https://api.github.com/users/goldenapples/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenapples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenapples/subscriptions","organizations_url":"https://api.github.com/users/goldenapples/orgs","repos_url":"https://api.github.com/users/goldenapples/repos","events_url":"https://api.github.com/users/goldenapples/events{/privacy}","received_events_url":"https://api.github.com/users/goldenapples/received_events","type":"User","site_admin":false},"body":"Addresses #9: because user ID's have the potential to overlap with post ID's (which are used as the ID for guest authors), this plugin will need to store the user_nicename instead.\r\n\r\nAlso, beefed up some of the tests in place and refactored out some of the copypasta from Co-Authors Plus.  ","created_at":"2015-02-12T10:57:36Z","updated_at":"2015-02-13T05:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d36fcdd75e93acf77cfa34bc57af07f807efa26","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21/commits","review_comments_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21/comments","review_comment_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/comments/{number}","comments_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/21/comments","statuses_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/statuses/b3267eac8798053e7957e49b448f63a02c928128","head":{"label":"fusioneng:than/key-off-user-nicename","ref":"than/key-off-user-nicename","sha":"b3267eac8798053e7957e49b448f63a02c928128","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":30006970,"name":"Co-Authors-Plus-Roles","full_name":"fusioneng/Co-Authors-Plus-Roles","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles","description":"","fork":false,"url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles","forks_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/forks","keys_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/teams","hooks_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/events","assignees_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/tags","blobs_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/languages","stargazers_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/subscription","commits_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/comments/{number}","contents_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/merges","archive_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/downloads","issues_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/releases{/id}","created_at":"2015-01-29T06:30:44Z","updated_at":"2015-02-10T18:47:44Z","pushed_at":"2015-02-13T00:41:06Z","git_url":"git://github.com/fusioneng/Co-Authors-Plus-Roles.git","ssh_url":"git@github.com:fusioneng/Co-Authors-Plus-Roles.git","clone_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles.git","svn_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles","homepage":null,"size":692,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":1,"default_branch":"master"}},"base":{"label":"fusioneng:master","ref":"master","sha":"e52906a21810545504bb80fa09d7d75348a7dcd9","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":30006970,"name":"Co-Authors-Plus-Roles","full_name":"fusioneng/Co-Authors-Plus-Roles","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles","description":"","fork":false,"url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles","forks_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/forks","keys_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/teams","hooks_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/events","assignees_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/tags","blobs_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/languages","stargazers_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/subscription","commits_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/comments/{number}","contents_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/merges","archive_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/downloads","issues_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/releases{/id}","created_at":"2015-01-29T06:30:44Z","updated_at":"2015-02-10T18:47:44Z","pushed_at":"2015-02-13T00:41:06Z","git_url":"git://github.com/fusioneng/Co-Authors-Plus-Roles.git","ssh_url":"git@github.com:fusioneng/Co-Authors-Plus-Roles.git","clone_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles.git","svn_url":"https://github.com/fusioneng/Co-Authors-Plus-Roles","homepage":null,"size":692,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21"},"html":{"href":"https://github.com/fusioneng/Co-Authors-Plus-Roles/pull/21"},"issue":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/21"},"comments":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/fusioneng/Co-Authors-Plus-Roles/statuses/b3267eac8798053e7957e49b448f63a02c928128"}}}}