{"action":"created","comment":{"url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/comments/233940521","pull_request_review_id":175471232,"id":233940521,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzk0MDUyMQ==","diff_hunk":"@@ -1,18 +1,43 @@\n <?php\n \n+session_start();\n+\n+if (!$_SESSION['loggedIn']) {\n+    header('Location:login.php');\n+}\n require_once ('vendor/autoload.php');\n \n use Pokedex\\DbConnection;\n use Pokedex\\PokeList;\n \n-$db = new DbConnection();\n-$pokeList = new PokeList($db->getDB());\n+$userID = (int)$_SESSION['id'];\n+$dbConnection = new DbConnection();\n+$pokeList = new PokeList($dbConnection->getDB(), $userID);\n \n-session_start();\n+if (!empty($_POST)) {\n+    foreach ($_POST as $query => $status) {","path":"index.php","position":21,"original_position":21,"commit_id":"f315606775a3f1e30a3905c4a4d92949860b1afc","original_commit_id":"ed6548d873af33243867fa25b5475e3ae4e59963","user":{"login":"mporam","id":6569497,"node_id":"MDQ6VXNlcjY1Njk0OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6569497?v=4","gravatar_id":"","url":"https://api.github.com/users/mporam","html_url":"https://github.com/mporam","followers_url":"https://api.github.com/users/mporam/followers","following_url":"https://api.github.com/users/mporam/following{/other_user}","gists_url":"https://api.github.com/users/mporam/gists{/gist_id}","starred_url":"https://api.github.com/users/mporam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mporam/subscriptions","organizations_url":"https://api.github.com/users/mporam/orgs","repos_url":"https://api.github.com/users/mporam/repos","events_url":"https://api.github.com/users/mporam/events{/privacy}","received_events_url":"https://api.github.com/users/mporam/received_events","type":"User","site_admin":false},"body":"no validation here, this is open to any post request.","created_at":"2018-11-15T17:33:53Z","updated_at":"2018-11-15T17:34:13Z","html_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20#discussion_r233940521","pull_request_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/comments/233940521"},"html":{"href":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20#discussion_r233940521"},"pull_request":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20","id":231272095,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjcyMDk1","html_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20","diff_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20.diff","patch_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20.patch","issue_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/20","number":20,"state":"open","locked":false,"title":"S5 main seen caught","user":{"login":"hoptond","id":42416719,"node_id":"MDQ6VXNlcjQyNDE2NzE5","avatar_url":"https://avatars2.githubusercontent.com/u/42416719?v=4","gravatar_id":"","url":"https://api.github.com/users/hoptond","html_url":"https://github.com/hoptond","followers_url":"https://api.github.com/users/hoptond/followers","following_url":"https://api.github.com/users/hoptond/following{/other_user}","gists_url":"https://api.github.com/users/hoptond/gists{/gist_id}","starred_url":"https://api.github.com/users/hoptond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoptond/subscriptions","organizations_url":"https://api.github.com/users/hoptond/orgs","repos_url":"https://api.github.com/users/hoptond/repos","events_url":"https://api.github.com/users/hoptond/events{/privacy}","received_events_url":"https://api.github.com/users/hoptond/received_events","type":"User","site_admin":false},"body":"Users can now flag pokemon as unseen, seen or caught. This updates the database accordingly.\r\n\r\nFiles to review:\r\n- sql/*\r\n- src/*\r\n- scss/*\r\n- index.php\r\n- login.php\r\n- emailValidation.php","created_at":"2018-11-15T17:15:23Z","updated_at":"2018-11-15T17:34:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23ee46f34d6ef60a63297006fa8dc43275bfc5ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20/commits","review_comments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20/comments","review_comment_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/20/comments","statuses_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/statuses/f315606775a3f1e30a3905c4a4d92949860b1afc","head":{"label":"Mayden-Academy:s5-main-seenCaught","ref":"s5-main-seenCaught","sha":"f315606775a3f1e30a3905c4a4d92949860b1afc","user":{"login":"Mayden-Academy","id":23072457,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcyNDU3","avatar_url":"https://avatars2.githubusercontent.com/u/23072457?v=4","gravatar_id":"","url":"https://api.github.com/users/Mayden-Academy","html_url":"https://github.com/Mayden-Academy","followers_url":"https://api.github.com/users/Mayden-Academy/followers","following_url":"https://api.github.com/users/Mayden-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Mayden-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mayden-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mayden-Academy/subscriptions","organizations_url":"https://api.github.com/users/Mayden-Academy/orgs","repos_url":"https://api.github.com/users/Mayden-Academy/repos","events_url":"https://api.github.com/users/Mayden-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Mayden-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":157214674,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyMTQ2NzQ=","name":"pokedex-2018-honeybadgers","full_name":"Mayden-Academy/pokedex-2018-honeybadgers","private":false,"owner":{"login":"Mayden-Academy","id":23072457,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcyNDU3","avatar_url":"https://avatars2.githubusercontent.com/u/23072457?v=4","gravatar_id":"","url":"https://api.github.com/users/Mayden-Academy","html_url":"https://github.com/Mayden-Academy","followers_url":"https://api.github.com/users/Mayden-Academy/followers","following_url":"https://api.github.com/users/Mayden-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Mayden-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mayden-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mayden-Academy/subscriptions","organizations_url":"https://api.github.com/users/Mayden-Academy/orgs","repos_url":"https://api.github.com/users/Mayden-Academy/repos","events_url":"https://api.github.com/users/Mayden-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Mayden-Academy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers","description":null,"fork":false,"url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers","forks_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/forks","keys_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/teams","hooks_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/hooks","issue_events_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/events{/number}","events_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/events","assignees_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/assignees{/user}","branches_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/branches{/branch}","tags_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/tags","blobs_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/statuses/{sha}","languages_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/languages","stargazers_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/stargazers","contributors_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/contributors","subscribers_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/subscribers","subscription_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/subscription","commits_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/contents/{+path}","compare_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/merges","archive_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/downloads","issues_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues{/number}","pulls_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls{/number}","milestones_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/milestones{/number}","notifications_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/labels{/name}","releases_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/releases{/id}","deployments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/deployments","created_at":"2018-11-12T13:04:03Z","updated_at":"2018-11-15T16:34:55Z","pushed_at":"2018-11-15T17:32:39Z","git_url":"git://github.com/Mayden-Academy/pokedex-2018-honeybadgers.git","ssh_url":"git@github.com:Mayden-Academy/pokedex-2018-honeybadgers.git","clone_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers.git","svn_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers","homepage":null,"size":170,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Mayden-Academy:master","ref":"master","sha":"9d4ad3bfc17a2a50534fa5d6a26dee51f4fee1f6","user":{"login":"Mayden-Academy","id":23072457,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcyNDU3","avatar_url":"https://avatars2.githubusercontent.com/u/23072457?v=4","gravatar_id":"","url":"https://api.github.com/users/Mayden-Academy","html_url":"https://github.com/Mayden-Academy","followers_url":"https://api.github.com/users/Mayden-Academy/followers","following_url":"https://api.github.com/users/Mayden-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Mayden-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mayden-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mayden-Academy/subscriptions","organizations_url":"https://api.github.com/users/Mayden-Academy/orgs","repos_url":"https://api.github.com/users/Mayden-Academy/repos","events_url":"https://api.github.com/users/Mayden-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Mayden-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":157214674,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyMTQ2NzQ=","name":"pokedex-2018-honeybadgers","full_name":"Mayden-Academy/pokedex-2018-honeybadgers","private":false,"owner":{"login":"Mayden-Academy","id":23072457,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcyNDU3","avatar_url":"https://avatars2.githubusercontent.com/u/23072457?v=4","gravatar_id":"","url":"https://api.github.com/users/Mayden-Academy","html_url":"https://github.com/Mayden-Academy","followers_url":"https://api.github.com/users/Mayden-Academy/followers","following_url":"https://api.github.com/users/Mayden-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Mayden-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Mayden-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mayden-Academy/subscriptions","organizations_url":"https://api.github.com/users/Mayden-Academy/orgs","repos_url":"https://api.github.com/users/Mayden-Academy/repos","events_url":"https://api.github.com/users/Mayden-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Mayden-Academy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers","description":null,"fork":false,"url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers","forks_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/forks","keys_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/teams","hooks_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/hooks","issue_events_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/events{/number}","events_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/events","assignees_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/assignees{/user}","branches_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/branches{/branch}","tags_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/tags","blobs_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/statuses/{sha}","languages_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/languages","stargazers_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/stargazers","contributors_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/contributors","subscribers_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/subscribers","subscription_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/subscription","commits_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/contents/{+path}","compare_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/merges","archive_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/downloads","issues_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues{/number}","pulls_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls{/number}","milestones_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/milestones{/number}","notifications_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/labels{/name}","releases_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/releases{/id}","deployments_url":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/deployments","created_at":"2018-11-12T13:04:03Z","updated_at":"2018-11-15T16:34:55Z","pushed_at":"2018-11-15T17:32:39Z","git_url":"git://github.com/Mayden-Academy/pokedex-2018-honeybadgers.git","ssh_url":"git@github.com:Mayden-Academy/pokedex-2018-honeybadgers.git","clone_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers.git","svn_url":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers","homepage":null,"size":170,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20"},"html":{"href":"https://github.com/Mayden-Academy/pokedex-2018-honeybadgers/pull/20"},"issue":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/20"},"comments":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/Mayden-Academy/pokedex-2018-honeybadgers/statuses/f315606775a3f1e30a3905c4a4d92949860b1afc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mporam"}}