{"action":"created","comment":{"url":"https://api.github.com/repos/oxwall/contactus/pulls/comments/35078547","id":35078547,"diff_hunk":"@@ -87,9 +87,13 @@ public function index()\n         $fieldMessage->setRequired();\n         $form->addElement($fieldMessage);\n \n-        $fieldCaptcha = new CaptchaField('captcha');\n-        $fieldCaptcha->setLabel($this->text('contactus', 'form_label_captcha'));\n-        $form->addElement($fieldCaptcha);\n+        if ( ow::getUser()->isAuthenticated() )","path":"controllers/contact.php","position":7,"original_position":7,"commit_id":"30b08f33937952cf64a1433a6f6bf9d0b6d6ace1","original_commit_id":"30b08f33937952cf64a1433a6f6bf9d0b6d6ace1","user":{"login":"ecki","id":361432,"avatar_url":"https://avatars.githubusercontent.com/u/361432?v=3","gravatar_id":"","url":"https://api.github.com/users/ecki","html_url":"https://github.com/ecki","followers_url":"https://api.github.com/users/ecki/followers","following_url":"https://api.github.com/users/ecki/following{/other_user}","gists_url":"https://api.github.com/users/ecki/gists{/gist_id}","starred_url":"https://api.github.com/users/ecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecki/subscriptions","organizations_url":"https://api.github.com/users/ecki/orgs","repos_url":"https://api.github.com/users/ecki/repos","events_url":"https://api.github.com/users/ecki/events{/privacy}","received_events_url":"https://api.github.com/users/ecki/received_events","type":"User","site_admin":false},"body":"Thanks I can do that. (Not sure what the difference is, I actually copied the condtion blindly from https://github.com/ecki/contactus/blob/topic-conditionalcaptcha/controllers/contact.php#L73 - want me to fix the casing in this place as well? )","created_at":"2015-07-21T08:13:57Z","updated_at":"2015-07-21T08:13:57Z","html_url":"https://github.com/oxwall/contactus/pull/1#discussion_r35078547","pull_request_url":"https://api.github.com/repos/oxwall/contactus/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/comments/35078547"},"html":{"href":"https://github.com/oxwall/contactus/pull/1#discussion_r35078547"},"pull_request":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/oxwall/contactus/pulls/1","id":39335290,"html_url":"https://github.com/oxwall/contactus/pull/1","diff_url":"https://github.com/oxwall/contactus/pull/1.diff","patch_url":"https://github.com/oxwall/contactus/pull/1.patch","issue_url":"https://api.github.com/repos/oxwall/contactus/issues/1","number":1,"state":"open","locked":false,"title":"Make captch conditional, not needed when logged in","user":{"login":"ecki","id":361432,"avatar_url":"https://avatars.githubusercontent.com/u/361432?v=3","gravatar_id":"","url":"https://api.github.com/users/ecki","html_url":"https://github.com/ecki","followers_url":"https://api.github.com/users/ecki/followers","following_url":"https://api.github.com/users/ecki/following{/other_user}","gists_url":"https://api.github.com/users/ecki/gists{/gist_id}","starred_url":"https://api.github.com/users/ecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecki/subscriptions","organizations_url":"https://api.github.com/users/ecki/orgs","repos_url":"https://api.github.com/users/ecki/repos","events_url":"https://api.github.com/users/ecki/events{/privacy}","received_events_url":"https://api.github.com/users/ecki/received_events","type":"User","site_admin":false},"body":"As suggested [here](http://www.oxwall.org/forum/topic/38934), this will make the captcha conditional. I am not sure how better check for the existence of the form field. If you want an alternative method let me know I am happy to adjust the PR.","created_at":"2015-07-07T05:00:08Z","updated_at":"2015-07-21T08:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd6ae3fabc23df22498f9faecac2cf0cabe866af","assignee":{"login":"spooner77","id":5583382,"avatar_url":"https://avatars.githubusercontent.com/u/5583382?v=3","gravatar_id":"","url":"https://api.github.com/users/spooner77","html_url":"https://github.com/spooner77","followers_url":"https://api.github.com/users/spooner77/followers","following_url":"https://api.github.com/users/spooner77/following{/other_user}","gists_url":"https://api.github.com/users/spooner77/gists{/gist_id}","starred_url":"https://api.github.com/users/spooner77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spooner77/subscriptions","organizations_url":"https://api.github.com/users/spooner77/orgs","repos_url":"https://api.github.com/users/spooner77/repos","events_url":"https://api.github.com/users/spooner77/events{/privacy}","received_events_url":"https://api.github.com/users/spooner77/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oxwall/contactus/pulls/1/commits","review_comments_url":"https://api.github.com/repos/oxwall/contactus/pulls/1/comments","review_comment_url":"https://api.github.com/repos/oxwall/contactus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oxwall/contactus/issues/1/comments","statuses_url":"https://api.github.com/repos/oxwall/contactus/statuses/30b08f33937952cf64a1433a6f6bf9d0b6d6ace1","head":{"label":"ecki:topic-conditionalcaptcha","ref":"topic-conditionalcaptcha","sha":"30b08f33937952cf64a1433a6f6bf9d0b6d6ace1","user":{"login":"ecki","id":361432,"avatar_url":"https://avatars.githubusercontent.com/u/361432?v=3","gravatar_id":"","url":"https://api.github.com/users/ecki","html_url":"https://github.com/ecki","followers_url":"https://api.github.com/users/ecki/followers","following_url":"https://api.github.com/users/ecki/following{/other_user}","gists_url":"https://api.github.com/users/ecki/gists{/gist_id}","starred_url":"https://api.github.com/users/ecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecki/subscriptions","organizations_url":"https://api.github.com/users/ecki/orgs","repos_url":"https://api.github.com/users/ecki/repos","events_url":"https://api.github.com/users/ecki/events{/privacy}","received_events_url":"https://api.github.com/users/ecki/received_events","type":"User","site_admin":false},"repo":{"id":38664794,"name":"contactus","full_name":"ecki/contactus","owner":{"login":"ecki","id":361432,"avatar_url":"https://avatars.githubusercontent.com/u/361432?v=3","gravatar_id":"","url":"https://api.github.com/users/ecki","html_url":"https://github.com/ecki","followers_url":"https://api.github.com/users/ecki/followers","following_url":"https://api.github.com/users/ecki/following{/other_user}","gists_url":"https://api.github.com/users/ecki/gists{/gist_id}","starred_url":"https://api.github.com/users/ecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecki/subscriptions","organizations_url":"https://api.github.com/users/ecki/orgs","repos_url":"https://api.github.com/users/ecki/repos","events_url":"https://api.github.com/users/ecki/events{/privacy}","received_events_url":"https://api.github.com/users/ecki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ecki/contactus","description":"Contact Us plugin for Oxwall. \"Contact us\" page with the ability to choose departments (email addresses)","fork":true,"url":"https://api.github.com/repos/ecki/contactus","forks_url":"https://api.github.com/repos/ecki/contactus/forks","keys_url":"https://api.github.com/repos/ecki/contactus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecki/contactus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecki/contactus/teams","hooks_url":"https://api.github.com/repos/ecki/contactus/hooks","issue_events_url":"https://api.github.com/repos/ecki/contactus/issues/events{/number}","events_url":"https://api.github.com/repos/ecki/contactus/events","assignees_url":"https://api.github.com/repos/ecki/contactus/assignees{/user}","branches_url":"https://api.github.com/repos/ecki/contactus/branches{/branch}","tags_url":"https://api.github.com/repos/ecki/contactus/tags","blobs_url":"https://api.github.com/repos/ecki/contactus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecki/contactus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecki/contactus/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecki/contactus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecki/contactus/statuses/{sha}","languages_url":"https://api.github.com/repos/ecki/contactus/languages","stargazers_url":"https://api.github.com/repos/ecki/contactus/stargazers","contributors_url":"https://api.github.com/repos/ecki/contactus/contributors","subscribers_url":"https://api.github.com/repos/ecki/contactus/subscribers","subscription_url":"https://api.github.com/repos/ecki/contactus/subscription","commits_url":"https://api.github.com/repos/ecki/contactus/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecki/contactus/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecki/contactus/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecki/contactus/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecki/contactus/contents/{+path}","compare_url":"https://api.github.com/repos/ecki/contactus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecki/contactus/merges","archive_url":"https://api.github.com/repos/ecki/contactus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecki/contactus/downloads","issues_url":"https://api.github.com/repos/ecki/contactus/issues{/number}","pulls_url":"https://api.github.com/repos/ecki/contactus/pulls{/number}","milestones_url":"https://api.github.com/repos/ecki/contactus/milestones{/number}","notifications_url":"https://api.github.com/repos/ecki/contactus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecki/contactus/labels{/name}","releases_url":"https://api.github.com/repos/ecki/contactus/releases{/id}","created_at":"2015-07-07T04:49:14Z","updated_at":"2015-07-07T04:49:15Z","pushed_at":"2015-07-07T04:56:35Z","git_url":"git://github.com/ecki/contactus.git","ssh_url":"git@github.com:ecki/contactus.git","clone_url":"https://github.com/ecki/contactus.git","svn_url":"https://github.com/ecki/contactus","homepage":null,"size":86,"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":"oxwall:master","ref":"master","sha":"98e5111a706b93097cb65cc59f475e7c88dd8ff8","user":{"login":"oxwall","id":10916559,"avatar_url":"https://avatars.githubusercontent.com/u/10916559?v=3","gravatar_id":"","url":"https://api.github.com/users/oxwall","html_url":"https://github.com/oxwall","followers_url":"https://api.github.com/users/oxwall/followers","following_url":"https://api.github.com/users/oxwall/following{/other_user}","gists_url":"https://api.github.com/users/oxwall/gists{/gist_id}","starred_url":"https://api.github.com/users/oxwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxwall/subscriptions","organizations_url":"https://api.github.com/users/oxwall/orgs","repos_url":"https://api.github.com/users/oxwall/repos","events_url":"https://api.github.com/users/oxwall/events{/privacy}","received_events_url":"https://api.github.com/users/oxwall/received_events","type":"Organization","site_admin":false},"repo":{"id":30526310,"name":"contactus","full_name":"oxwall/contactus","owner":{"login":"oxwall","id":10916559,"avatar_url":"https://avatars.githubusercontent.com/u/10916559?v=3","gravatar_id":"","url":"https://api.github.com/users/oxwall","html_url":"https://github.com/oxwall","followers_url":"https://api.github.com/users/oxwall/followers","following_url":"https://api.github.com/users/oxwall/following{/other_user}","gists_url":"https://api.github.com/users/oxwall/gists{/gist_id}","starred_url":"https://api.github.com/users/oxwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxwall/subscriptions","organizations_url":"https://api.github.com/users/oxwall/orgs","repos_url":"https://api.github.com/users/oxwall/repos","events_url":"https://api.github.com/users/oxwall/events{/privacy}","received_events_url":"https://api.github.com/users/oxwall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oxwall/contactus","description":"Contact Us plugin for Oxwall. \"Contact us\" page with the ability to choose departments (email addresses)","fork":false,"url":"https://api.github.com/repos/oxwall/contactus","forks_url":"https://api.github.com/repos/oxwall/contactus/forks","keys_url":"https://api.github.com/repos/oxwall/contactus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oxwall/contactus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oxwall/contactus/teams","hooks_url":"https://api.github.com/repos/oxwall/contactus/hooks","issue_events_url":"https://api.github.com/repos/oxwall/contactus/issues/events{/number}","events_url":"https://api.github.com/repos/oxwall/contactus/events","assignees_url":"https://api.github.com/repos/oxwall/contactus/assignees{/user}","branches_url":"https://api.github.com/repos/oxwall/contactus/branches{/branch}","tags_url":"https://api.github.com/repos/oxwall/contactus/tags","blobs_url":"https://api.github.com/repos/oxwall/contactus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oxwall/contactus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oxwall/contactus/git/refs{/sha}","trees_url":"https://api.github.com/repos/oxwall/contactus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oxwall/contactus/statuses/{sha}","languages_url":"https://api.github.com/repos/oxwall/contactus/languages","stargazers_url":"https://api.github.com/repos/oxwall/contactus/stargazers","contributors_url":"https://api.github.com/repos/oxwall/contactus/contributors","subscribers_url":"https://api.github.com/repos/oxwall/contactus/subscribers","subscription_url":"https://api.github.com/repos/oxwall/contactus/subscription","commits_url":"https://api.github.com/repos/oxwall/contactus/commits{/sha}","git_commits_url":"https://api.github.com/repos/oxwall/contactus/git/commits{/sha}","comments_url":"https://api.github.com/repos/oxwall/contactus/comments{/number}","issue_comment_url":"https://api.github.com/repos/oxwall/contactus/issues/comments{/number}","contents_url":"https://api.github.com/repos/oxwall/contactus/contents/{+path}","compare_url":"https://api.github.com/repos/oxwall/contactus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oxwall/contactus/merges","archive_url":"https://api.github.com/repos/oxwall/contactus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oxwall/contactus/downloads","issues_url":"https://api.github.com/repos/oxwall/contactus/issues{/number}","pulls_url":"https://api.github.com/repos/oxwall/contactus/pulls{/number}","milestones_url":"https://api.github.com/repos/oxwall/contactus/milestones{/number}","notifications_url":"https://api.github.com/repos/oxwall/contactus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oxwall/contactus/labels{/name}","releases_url":"https://api.github.com/repos/oxwall/contactus/releases{/id}","created_at":"2015-02-09T08:42:12Z","updated_at":"2015-04-14T11:17:16Z","pushed_at":"2015-07-19T12:16:51Z","git_url":"git://github.com/oxwall/contactus.git","ssh_url":"git@github.com:oxwall/contactus.git","clone_url":"https://github.com/oxwall/contactus.git","svn_url":"https://github.com/oxwall/contactus","homepage":null,"size":358,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/1"},"html":{"href":"https://github.com/oxwall/contactus/pull/1"},"issue":{"href":"https://api.github.com/repos/oxwall/contactus/issues/1"},"comments":{"href":"https://api.github.com/repos/oxwall/contactus/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oxwall/contactus/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/oxwall/contactus/statuses/30b08f33937952cf64a1433a6f6bf9d0b6d6ace1"}}}}