{"action":"created","comment":{"url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/comments/54913100","id":54913100,"diff_hunk":"@@ -55,26 +55,32 @@\n \n $f_bug_id = gpc_get_int( 'bug_id' );\n $t_bug = bug_get( $f_bug_id, true );\n-$f_username = gpc_get_string( 'username', '' );\n+$f_usernames = gpc_get_string( 'username', '' );\n \n $t_logged_in_user_id = auth_get_current_user_id();\n \n-if( is_blank( $f_username ) ) {\n-\t$t_user_id = $t_logged_in_user_id;\n+if( is_blank( $f_usernames ) ) {\n+\t$t_user_ids = array( $t_logged_in_user_id );\n } else {\n-\t$t_user_id = user_get_id_by_name( $f_username );\n-\tif( $t_user_id === false ) {\n-\t\t$t_user_id = user_get_id_by_realname( $f_username );\n-\n+\t$t_user_ids = array();\n+\tforeach( explode( ',', $f_usernames ) as $f_username ) {\n+\t\t$t_user_id = user_get_id_by_name( $f_username );","path":"bug_monitor_add.php","position":20,"original_position":20,"commit_id":"c33555fc15aefee28677c9a06f7147649db93d24","original_commit_id":"c33555fc15aefee28677c9a06f7147649db93d24","user":{"login":"vboctor","id":6446,"avatar_url":"https://avatars.githubusercontent.com/u/6446?v=3","gravatar_id":"","url":"https://api.github.com/users/vboctor","html_url":"https://github.com/vboctor","followers_url":"https://api.github.com/users/vboctor/followers","following_url":"https://api.github.com/users/vboctor/following{/other_user}","gists_url":"https://api.github.com/users/vboctor/gists{/gist_id}","starred_url":"https://api.github.com/users/vboctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vboctor/subscriptions","organizations_url":"https://api.github.com/users/vboctor/orgs","repos_url":"https://api.github.com/users/vboctor/repos","events_url":"https://api.github.com/users/vboctor/events{/privacy}","received_events_url":"https://api.github.com/users/vboctor/received_events","type":"User","site_admin":false},"body":"Trip username before passing in to this method or trim() within the method.","created_at":"2016-03-03T17:16:27Z","updated_at":"2016-03-03T17:16:27Z","html_url":"https://github.com/mantisbt/mantisbt/pull/727#discussion_r54913100","pull_request_url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727","_links":{"self":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/comments/54913100"},"html":{"href":"https://github.com/mantisbt/mantisbt/pull/727#discussion_r54913100"},"pull_request":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727"}}},"pull_request":{"url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727","id":61379715,"html_url":"https://github.com/mantisbt/mantisbt/pull/727","diff_url":"https://github.com/mantisbt/mantisbt/pull/727.diff","patch_url":"https://github.com/mantisbt/mantisbt/pull/727.patch","issue_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/727","number":727,"state":"open","locked":false,"title":"Allow adding comma-separated monitor list","user":{"login":"tgulacsi","id":256074,"avatar_url":"https://avatars.githubusercontent.com/u/256074?v=3","gravatar_id":"","url":"https://api.github.com/users/tgulacsi","html_url":"https://github.com/tgulacsi","followers_url":"https://api.github.com/users/tgulacsi/followers","following_url":"https://api.github.com/users/tgulacsi/following{/other_user}","gists_url":"https://api.github.com/users/tgulacsi/gists{/gist_id}","starred_url":"https://api.github.com/users/tgulacsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgulacsi/subscriptions","organizations_url":"https://api.github.com/users/tgulacsi/orgs","repos_url":"https://api.github.com/users/tgulacsi/repos","events_url":"https://api.github.com/users/tgulacsi/events{/privacy}","received_events_url":"https://api.github.com/users/tgulacsi/received_events","type":"User","site_admin":false},"body":"This helps adding the same herd of monitors to similar bugs: just copy\r\nthe list, comma-separated into the \"username\" field.","created_at":"2016-03-02T10:30:30Z","updated_at":"2016-03-03T17:16:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b1b6b6f00793f3f21c71663fc4dc40eea5195f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727/commits","review_comments_url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727/comments","review_comment_url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/727/comments","statuses_url":"https://api.github.com/repos/mantisbt/mantisbt/statuses/c33555fc15aefee28677c9a06f7147649db93d24","head":{"label":"tgulacsi:multi-monitor-add","ref":"multi-monitor-add","sha":"c33555fc15aefee28677c9a06f7147649db93d24","user":{"login":"tgulacsi","id":256074,"avatar_url":"https://avatars.githubusercontent.com/u/256074?v=3","gravatar_id":"","url":"https://api.github.com/users/tgulacsi","html_url":"https://github.com/tgulacsi","followers_url":"https://api.github.com/users/tgulacsi/followers","following_url":"https://api.github.com/users/tgulacsi/following{/other_user}","gists_url":"https://api.github.com/users/tgulacsi/gists{/gist_id}","starred_url":"https://api.github.com/users/tgulacsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgulacsi/subscriptions","organizations_url":"https://api.github.com/users/tgulacsi/orgs","repos_url":"https://api.github.com/users/tgulacsi/repos","events_url":"https://api.github.com/users/tgulacsi/events{/privacy}","received_events_url":"https://api.github.com/users/tgulacsi/received_events","type":"User","site_admin":false},"repo":{"id":52086001,"name":"mantisbt","full_name":"tgulacsi/mantisbt","owner":{"login":"tgulacsi","id":256074,"avatar_url":"https://avatars.githubusercontent.com/u/256074?v=3","gravatar_id":"","url":"https://api.github.com/users/tgulacsi","html_url":"https://github.com/tgulacsi","followers_url":"https://api.github.com/users/tgulacsi/followers","following_url":"https://api.github.com/users/tgulacsi/following{/other_user}","gists_url":"https://api.github.com/users/tgulacsi/gists{/gist_id}","starred_url":"https://api.github.com/users/tgulacsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgulacsi/subscriptions","organizations_url":"https://api.github.com/users/tgulacsi/orgs","repos_url":"https://api.github.com/users/tgulacsi/repos","events_url":"https://api.github.com/users/tgulacsi/events{/privacy}","received_events_url":"https://api.github.com/users/tgulacsi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgulacsi/mantisbt","description":"Mantis Bug Tracker (MantisBT)","fork":true,"url":"https://api.github.com/repos/tgulacsi/mantisbt","forks_url":"https://api.github.com/repos/tgulacsi/mantisbt/forks","keys_url":"https://api.github.com/repos/tgulacsi/mantisbt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgulacsi/mantisbt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgulacsi/mantisbt/teams","hooks_url":"https://api.github.com/repos/tgulacsi/mantisbt/hooks","issue_events_url":"https://api.github.com/repos/tgulacsi/mantisbt/issues/events{/number}","events_url":"https://api.github.com/repos/tgulacsi/mantisbt/events","assignees_url":"https://api.github.com/repos/tgulacsi/mantisbt/assignees{/user}","branches_url":"https://api.github.com/repos/tgulacsi/mantisbt/branches{/branch}","tags_url":"https://api.github.com/repos/tgulacsi/mantisbt/tags","blobs_url":"https://api.github.com/repos/tgulacsi/mantisbt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgulacsi/mantisbt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgulacsi/mantisbt/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgulacsi/mantisbt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgulacsi/mantisbt/statuses/{sha}","languages_url":"https://api.github.com/repos/tgulacsi/mantisbt/languages","stargazers_url":"https://api.github.com/repos/tgulacsi/mantisbt/stargazers","contributors_url":"https://api.github.com/repos/tgulacsi/mantisbt/contributors","subscribers_url":"https://api.github.com/repos/tgulacsi/mantisbt/subscribers","subscription_url":"https://api.github.com/repos/tgulacsi/mantisbt/subscription","commits_url":"https://api.github.com/repos/tgulacsi/mantisbt/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgulacsi/mantisbt/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgulacsi/mantisbt/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgulacsi/mantisbt/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgulacsi/mantisbt/contents/{+path}","compare_url":"https://api.github.com/repos/tgulacsi/mantisbt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgulacsi/mantisbt/merges","archive_url":"https://api.github.com/repos/tgulacsi/mantisbt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgulacsi/mantisbt/downloads","issues_url":"https://api.github.com/repos/tgulacsi/mantisbt/issues{/number}","pulls_url":"https://api.github.com/repos/tgulacsi/mantisbt/pulls{/number}","milestones_url":"https://api.github.com/repos/tgulacsi/mantisbt/milestones{/number}","notifications_url":"https://api.github.com/repos/tgulacsi/mantisbt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgulacsi/mantisbt/labels{/name}","releases_url":"https://api.github.com/repos/tgulacsi/mantisbt/releases{/id}","deployments_url":"https://api.github.com/repos/tgulacsi/mantisbt/deployments","created_at":"2016-02-19T12:24:09Z","updated_at":"2016-02-19T12:24:12Z","pushed_at":"2016-03-02T11:07:59Z","git_url":"git://github.com/tgulacsi/mantisbt.git","ssh_url":"git@github.com:tgulacsi/mantisbt.git","clone_url":"https://github.com/tgulacsi/mantisbt.git","svn_url":"https://github.com/tgulacsi/mantisbt","homepage":"http://www.mantisbt.org","size":49343,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mantisbt:master","ref":"master","sha":"b78d3ec7b87406bc911b66b04428cad4d7f3366e","user":{"login":"mantisbt","id":318027,"avatar_url":"https://avatars.githubusercontent.com/u/318027?v=3","gravatar_id":"","url":"https://api.github.com/users/mantisbt","html_url":"https://github.com/mantisbt","followers_url":"https://api.github.com/users/mantisbt/followers","following_url":"https://api.github.com/users/mantisbt/following{/other_user}","gists_url":"https://api.github.com/users/mantisbt/gists{/gist_id}","starred_url":"https://api.github.com/users/mantisbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantisbt/subscriptions","organizations_url":"https://api.github.com/users/mantisbt/orgs","repos_url":"https://api.github.com/users/mantisbt/repos","events_url":"https://api.github.com/users/mantisbt/events{/privacy}","received_events_url":"https://api.github.com/users/mantisbt/received_events","type":"Organization","site_admin":false},"repo":{"id":747755,"name":"mantisbt","full_name":"mantisbt/mantisbt","owner":{"login":"mantisbt","id":318027,"avatar_url":"https://avatars.githubusercontent.com/u/318027?v=3","gravatar_id":"","url":"https://api.github.com/users/mantisbt","html_url":"https://github.com/mantisbt","followers_url":"https://api.github.com/users/mantisbt/followers","following_url":"https://api.github.com/users/mantisbt/following{/other_user}","gists_url":"https://api.github.com/users/mantisbt/gists{/gist_id}","starred_url":"https://api.github.com/users/mantisbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantisbt/subscriptions","organizations_url":"https://api.github.com/users/mantisbt/orgs","repos_url":"https://api.github.com/users/mantisbt/repos","events_url":"https://api.github.com/users/mantisbt/events{/privacy}","received_events_url":"https://api.github.com/users/mantisbt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantisbt/mantisbt","description":"Mantis Bug Tracker (MantisBT)","fork":false,"url":"https://api.github.com/repos/mantisbt/mantisbt","forks_url":"https://api.github.com/repos/mantisbt/mantisbt/forks","keys_url":"https://api.github.com/repos/mantisbt/mantisbt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantisbt/mantisbt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantisbt/mantisbt/teams","hooks_url":"https://api.github.com/repos/mantisbt/mantisbt/hooks","issue_events_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/events{/number}","events_url":"https://api.github.com/repos/mantisbt/mantisbt/events","assignees_url":"https://api.github.com/repos/mantisbt/mantisbt/assignees{/user}","branches_url":"https://api.github.com/repos/mantisbt/mantisbt/branches{/branch}","tags_url":"https://api.github.com/repos/mantisbt/mantisbt/tags","blobs_url":"https://api.github.com/repos/mantisbt/mantisbt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantisbt/mantisbt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantisbt/mantisbt/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantisbt/mantisbt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantisbt/mantisbt/statuses/{sha}","languages_url":"https://api.github.com/repos/mantisbt/mantisbt/languages","stargazers_url":"https://api.github.com/repos/mantisbt/mantisbt/stargazers","contributors_url":"https://api.github.com/repos/mantisbt/mantisbt/contributors","subscribers_url":"https://api.github.com/repos/mantisbt/mantisbt/subscribers","subscription_url":"https://api.github.com/repos/mantisbt/mantisbt/subscription","commits_url":"https://api.github.com/repos/mantisbt/mantisbt/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantisbt/mantisbt/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantisbt/mantisbt/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantisbt/mantisbt/contents/{+path}","compare_url":"https://api.github.com/repos/mantisbt/mantisbt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantisbt/mantisbt/merges","archive_url":"https://api.github.com/repos/mantisbt/mantisbt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantisbt/mantisbt/downloads","issues_url":"https://api.github.com/repos/mantisbt/mantisbt/issues{/number}","pulls_url":"https://api.github.com/repos/mantisbt/mantisbt/pulls{/number}","milestones_url":"https://api.github.com/repos/mantisbt/mantisbt/milestones{/number}","notifications_url":"https://api.github.com/repos/mantisbt/mantisbt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantisbt/mantisbt/labels{/name}","releases_url":"https://api.github.com/repos/mantisbt/mantisbt/releases{/id}","deployments_url":"https://api.github.com/repos/mantisbt/mantisbt/deployments","created_at":"2010-06-29T21:42:07Z","updated_at":"2016-03-03T09:30:25Z","pushed_at":"2016-03-03T17:06:08Z","git_url":"git://github.com/mantisbt/mantisbt.git","ssh_url":"git@github.com:mantisbt/mantisbt.git","clone_url":"https://github.com/mantisbt/mantisbt.git","svn_url":"https://github.com/mantisbt/mantisbt","homepage":"http://www.mantisbt.org","size":74665,"stargazers_count":560,"watchers_count":560,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":298,"mirror_url":null,"open_issues_count":72,"forks":298,"open_issues":72,"watchers":560,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727"},"html":{"href":"https://github.com/mantisbt/mantisbt/pull/727"},"issue":{"href":"https://api.github.com/repos/mantisbt/mantisbt/issues/727"},"comments":{"href":"https://api.github.com/repos/mantisbt/mantisbt/issues/727/comments"},"review_comments":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727/comments"},"review_comment":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mantisbt/mantisbt/pulls/727/commits"},"statuses":{"href":"https://api.github.com/repos/mantisbt/mantisbt/statuses/c33555fc15aefee28677c9a06f7147649db93d24"}}}}