{"action":"created","comment":{"url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/comments/40755712","id":40755712,"diff_hunk":"@@ -0,0 +1,81 @@\n+<?php\n+class UsersController extends AppController\n+{\n+    // Declare constants to avoid the use of \"magic numbers\"\n+    const REGISTER_USER = 'register';\n+    const REGISTER_END_USER = 'register_end';\n+    const LOGIN_USER = 'login';\n+    const LOGIN_END_USER = 'login_end';\n+\n+    public function login() \n+    {   \n+        $user = new Users();\n+        $page = Param::get('page_next', self::LOGIN_USER);\n+        \n+        switch ($page){\n+            case self::LOGIN_USER:\n+                break;\n+\n+            case self::LOGIN_END_USER:\n+                $user->username = Param::get('username');                \n+                $user->password = Param::get('password');\n+                try {\n+                    $user_account = $user->login($user);\n+                    session_start();\n+                    $_SESSION['username'] = $user_account->username;\n+                    $_SESSION['id'] = $user_account->id;\n+                } catch (RecordNotFoundException $e){","path":"board/app/controllers/users_controller.php","position":27,"original_position":27,"commit_id":"b3c8ce66bdc485e1df72737774b596947538f04d","original_commit_id":"b3c8ce66bdc485e1df72737774b596947538f04d","user":{"login":"maragatchalian","id":10491936,"avatar_url":"https://avatars.githubusercontent.com/u/10491936?v=3","gravatar_id":"","url":"https://api.github.com/users/maragatchalian","html_url":"https://github.com/maragatchalian","followers_url":"https://api.github.com/users/maragatchalian/followers","following_url":"https://api.github.com/users/maragatchalian/following{/other_user}","gists_url":"https://api.github.com/users/maragatchalian/gists{/gist_id}","starred_url":"https://api.github.com/users/maragatchalian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maragatchalian/subscriptions","organizations_url":"https://api.github.com/users/maragatchalian/orgs","repos_url":"https://api.github.com/users/maragatchalian/repos","events_url":"https://api.github.com/users/maragatchalian/events{/privacy}","received_events_url":"https://api.github.com/users/maragatchalian/received_events","type":"User","site_admin":false},"body":"Same [here](https://github.com/gelsyjuntilla/board_exercises/pull/1/files#r40755124) po :bow:","created_at":"2015-09-30T03:32:41Z","updated_at":"2015-09-30T03:32:41Z","html_url":"https://github.com/gelsyjuntilla/board_exercises/pull/1#discussion_r40755712","pull_request_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/comments/40755712"},"html":{"href":"https://github.com/gelsyjuntilla/board_exercises/pull/1#discussion_r40755712"},"pull_request":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1","id":45876488,"html_url":"https://github.com/gelsyjuntilla/board_exercises/pull/1","diff_url":"https://github.com/gelsyjuntilla/board_exercises/pull/1.diff","patch_url":"https://github.com/gelsyjuntilla/board_exercises/pull/1.patch","issue_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/1","number":1,"state":"open","locked":false,"title":"dev_1.0","user":{"login":"gelsyjuntilla","id":13842601,"avatar_url":"https://avatars.githubusercontent.com/u/13842601?v=3","gravatar_id":"","url":"https://api.github.com/users/gelsyjuntilla","html_url":"https://github.com/gelsyjuntilla","followers_url":"https://api.github.com/users/gelsyjuntilla/followers","following_url":"https://api.github.com/users/gelsyjuntilla/following{/other_user}","gists_url":"https://api.github.com/users/gelsyjuntilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gelsyjuntilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelsyjuntilla/subscriptions","organizations_url":"https://api.github.com/users/gelsyjuntilla/orgs","repos_url":"https://api.github.com/users/gelsyjuntilla/repos","events_url":"https://api.github.com/users/gelsyjuntilla/events{/privacy}","received_events_url":"https://api.github.com/users/gelsyjuntilla/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-24T09:34:38Z","updated_at":"2015-09-30T03:32:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98dbecb2c779d0e4bce189e8bac3daed0f635ff2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/1/comments","statuses_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/statuses/b3c8ce66bdc485e1df72737774b596947538f04d","head":{"label":"gelsyjuntilla:dev_1.0","ref":"dev_1.0","sha":"b3c8ce66bdc485e1df72737774b596947538f04d","user":{"login":"gelsyjuntilla","id":13842601,"avatar_url":"https://avatars.githubusercontent.com/u/13842601?v=3","gravatar_id":"","url":"https://api.github.com/users/gelsyjuntilla","html_url":"https://github.com/gelsyjuntilla","followers_url":"https://api.github.com/users/gelsyjuntilla/followers","following_url":"https://api.github.com/users/gelsyjuntilla/following{/other_user}","gists_url":"https://api.github.com/users/gelsyjuntilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gelsyjuntilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelsyjuntilla/subscriptions","organizations_url":"https://api.github.com/users/gelsyjuntilla/orgs","repos_url":"https://api.github.com/users/gelsyjuntilla/repos","events_url":"https://api.github.com/users/gelsyjuntilla/events{/privacy}","received_events_url":"https://api.github.com/users/gelsyjuntilla/received_events","type":"User","site_admin":false},"repo":{"id":42690464,"name":"board_exercises","full_name":"gelsyjuntilla/board_exercises","owner":{"login":"gelsyjuntilla","id":13842601,"avatar_url":"https://avatars.githubusercontent.com/u/13842601?v=3","gravatar_id":"","url":"https://api.github.com/users/gelsyjuntilla","html_url":"https://github.com/gelsyjuntilla","followers_url":"https://api.github.com/users/gelsyjuntilla/followers","following_url":"https://api.github.com/users/gelsyjuntilla/following{/other_user}","gists_url":"https://api.github.com/users/gelsyjuntilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gelsyjuntilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelsyjuntilla/subscriptions","organizations_url":"https://api.github.com/users/gelsyjuntilla/orgs","repos_url":"https://api.github.com/users/gelsyjuntilla/repos","events_url":"https://api.github.com/users/gelsyjuntilla/events{/privacy}","received_events_url":"https://api.github.com/users/gelsyjuntilla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gelsyjuntilla/board_exercises","description":"","fork":false,"url":"https://api.github.com/repos/gelsyjuntilla/board_exercises","forks_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/forks","keys_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/teams","hooks_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/hooks","issue_events_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/events","assignees_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/tags","blobs_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/languages","stargazers_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/stargazers","contributors_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/contributors","subscribers_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/subscribers","subscription_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/subscription","commits_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/merges","archive_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/downloads","issues_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/labels{/name}","releases_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/releases{/id}","created_at":"2015-09-18T00:40:56Z","updated_at":"2015-09-18T01:35:42Z","pushed_at":"2015-09-30T00:35:25Z","git_url":"git://github.com/gelsyjuntilla/board_exercises.git","ssh_url":"git@github.com:gelsyjuntilla/board_exercises.git","clone_url":"https://github.com/gelsyjuntilla/board_exercises.git","svn_url":"https://github.com/gelsyjuntilla/board_exercises","homepage":null,"size":468,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev_1.0"}},"base":{"label":"gelsyjuntilla:master","ref":"master","sha":"cec9cbdfcf5a4eee8e3020710de45ffbcd8e60e5","user":{"login":"gelsyjuntilla","id":13842601,"avatar_url":"https://avatars.githubusercontent.com/u/13842601?v=3","gravatar_id":"","url":"https://api.github.com/users/gelsyjuntilla","html_url":"https://github.com/gelsyjuntilla","followers_url":"https://api.github.com/users/gelsyjuntilla/followers","following_url":"https://api.github.com/users/gelsyjuntilla/following{/other_user}","gists_url":"https://api.github.com/users/gelsyjuntilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gelsyjuntilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelsyjuntilla/subscriptions","organizations_url":"https://api.github.com/users/gelsyjuntilla/orgs","repos_url":"https://api.github.com/users/gelsyjuntilla/repos","events_url":"https://api.github.com/users/gelsyjuntilla/events{/privacy}","received_events_url":"https://api.github.com/users/gelsyjuntilla/received_events","type":"User","site_admin":false},"repo":{"id":42690464,"name":"board_exercises","full_name":"gelsyjuntilla/board_exercises","owner":{"login":"gelsyjuntilla","id":13842601,"avatar_url":"https://avatars.githubusercontent.com/u/13842601?v=3","gravatar_id":"","url":"https://api.github.com/users/gelsyjuntilla","html_url":"https://github.com/gelsyjuntilla","followers_url":"https://api.github.com/users/gelsyjuntilla/followers","following_url":"https://api.github.com/users/gelsyjuntilla/following{/other_user}","gists_url":"https://api.github.com/users/gelsyjuntilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gelsyjuntilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelsyjuntilla/subscriptions","organizations_url":"https://api.github.com/users/gelsyjuntilla/orgs","repos_url":"https://api.github.com/users/gelsyjuntilla/repos","events_url":"https://api.github.com/users/gelsyjuntilla/events{/privacy}","received_events_url":"https://api.github.com/users/gelsyjuntilla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gelsyjuntilla/board_exercises","description":"","fork":false,"url":"https://api.github.com/repos/gelsyjuntilla/board_exercises","forks_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/forks","keys_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/teams","hooks_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/hooks","issue_events_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/events","assignees_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/tags","blobs_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/languages","stargazers_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/stargazers","contributors_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/contributors","subscribers_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/subscribers","subscription_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/subscription","commits_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/merges","archive_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/downloads","issues_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/labels{/name}","releases_url":"https://api.github.com/repos/gelsyjuntilla/board_exercises/releases{/id}","created_at":"2015-09-18T00:40:56Z","updated_at":"2015-09-18T01:35:42Z","pushed_at":"2015-09-30T00:35:25Z","git_url":"git://github.com/gelsyjuntilla/board_exercises.git","ssh_url":"git@github.com:gelsyjuntilla/board_exercises.git","clone_url":"https://github.com/gelsyjuntilla/board_exercises.git","svn_url":"https://github.com/gelsyjuntilla/board_exercises","homepage":null,"size":468,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev_1.0"}},"_links":{"self":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1"},"html":{"href":"https://github.com/gelsyjuntilla/board_exercises/pull/1"},"issue":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/1"},"comments":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gelsyjuntilla/board_exercises/statuses/b3c8ce66bdc485e1df72737774b596947538f04d"}}}}