{"action":"created","comment":{"url":"https://api.github.com/repos/maragatchalian/Board/pulls/comments/27275429","id":27275429,"diff_hunk":"@@ -135,5 +132,143 @@ public function is_email_exist()\n         $username_exist = $db->row(\"SELECT email FROM user where email = ?\", array($this->email));\n         return (!$username_exist);\n     }\n-}\n-?>\n\\ No newline at end of file\n+\n+\n+    public static function get($user_id) {\n+        $db = DB::conn();\n+        $row = $db->row('SELECT * FROM user WHERE id = ?', array($user_id));\n+        return $row;\n+    }   \n+\n+    public static function getAll($id) {\n+        $user = array();\n+        $db = DB::conn();\n+        $rows = $db->rows(\"SELECT * FROM user WHERE id = ?\", array($id));\n+        \n+        foreach ($rows as $row) {\n+            $user[] = new self($row);\n+            }\n+        return $user;\n+        }\n+\n+    //Gets user's Data\n+    public static function getData($user_id){\n+    $db = DB::conn();\n+    $row = $db->row(\"SELECT * FROM user\n+        WHERE id = ?\", array($user_id));\n+    if (!$row) {\n+    throw new RecordNotFoundException('no record found');\n+    }\n+    return new self($row);\n+    }","path":"board/app/models/user.php","position":107,"original_position":107,"commit_id":"d996d26b03787ece477c7c247b17b8be47a85200","original_commit_id":"d996d26b03787ece477c7c247b17b8be47a85200","user":{"login":"rtanklab","id":5572889,"avatar_url":"https://avatars.githubusercontent.com/u/5572889?v=3","gravatar_id":"","url":"https://api.github.com/users/rtanklab","html_url":"https://github.com/rtanklab","followers_url":"https://api.github.com/users/rtanklab/followers","following_url":"https://api.github.com/users/rtanklab/following{/other_user}","gists_url":"https://api.github.com/users/rtanklab/gists{/gist_id}","starred_url":"https://api.github.com/users/rtanklab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtanklab/subscriptions","organizations_url":"https://api.github.com/users/rtanklab/orgs","repos_url":"https://api.github.com/users/rtanklab/repos","events_url":"https://api.github.com/users/rtanklab/events{/privacy}","received_events_url":"https://api.github.com/users/rtanklab/received_events","type":"User","site_admin":false},"body":"get(), getAll() and getData() are all doing the same po","created_at":"2015-03-27T04:26:55Z","updated_at":"2015-03-27T04:26:55Z","html_url":"https://github.com/maragatchalian/Board/pull/2#discussion_r27275429","pull_request_url":"https://api.github.com/repos/maragatchalian/Board/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/comments/27275429"},"html":{"href":"https://github.com/maragatchalian/Board/pull/2#discussion_r27275429"},"pull_request":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/maragatchalian/Board/pulls/2","id":31411789,"html_url":"https://github.com/maragatchalian/Board/pull/2","diff_url":"https://github.com/maragatchalian/Board/pull/2.diff","patch_url":"https://github.com/maragatchalian/Board/pull/2.patch","issue_url":"https://api.github.com/repos/maragatchalian/Board/issues/2","number":2,"state":"open","locked":false,"title":"dev_1.1","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":"","created_at":"2015-03-18T09:28:56Z","updated_at":"2015-03-27T04:26:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a43a0a27a51157cdf37ef1847987dbaae89ab2aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maragatchalian/Board/pulls/2/commits","review_comments_url":"https://api.github.com/repos/maragatchalian/Board/pulls/2/comments","review_comment_url":"https://api.github.com/repos/maragatchalian/Board/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maragatchalian/Board/issues/2/comments","statuses_url":"https://api.github.com/repos/maragatchalian/Board/statuses/d996d26b03787ece477c7c247b17b8be47a85200","head":{"label":"maragatchalian:dev_1.1","ref":"dev_1.1","sha":"d996d26b03787ece477c7c247b17b8be47a85200","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},"repo":{"id":30956881,"name":"Board","full_name":"maragatchalian/Board","owner":{"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},"private":false,"html_url":"https://github.com/maragatchalian/Board","description":"","fork":false,"url":"https://api.github.com/repos/maragatchalian/Board","forks_url":"https://api.github.com/repos/maragatchalian/Board/forks","keys_url":"https://api.github.com/repos/maragatchalian/Board/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maragatchalian/Board/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maragatchalian/Board/teams","hooks_url":"https://api.github.com/repos/maragatchalian/Board/hooks","issue_events_url":"https://api.github.com/repos/maragatchalian/Board/issues/events{/number}","events_url":"https://api.github.com/repos/maragatchalian/Board/events","assignees_url":"https://api.github.com/repos/maragatchalian/Board/assignees{/user}","branches_url":"https://api.github.com/repos/maragatchalian/Board/branches{/branch}","tags_url":"https://api.github.com/repos/maragatchalian/Board/tags","blobs_url":"https://api.github.com/repos/maragatchalian/Board/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maragatchalian/Board/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maragatchalian/Board/git/refs{/sha}","trees_url":"https://api.github.com/repos/maragatchalian/Board/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maragatchalian/Board/statuses/{sha}","languages_url":"https://api.github.com/repos/maragatchalian/Board/languages","stargazers_url":"https://api.github.com/repos/maragatchalian/Board/stargazers","contributors_url":"https://api.github.com/repos/maragatchalian/Board/contributors","subscribers_url":"https://api.github.com/repos/maragatchalian/Board/subscribers","subscription_url":"https://api.github.com/repos/maragatchalian/Board/subscription","commits_url":"https://api.github.com/repos/maragatchalian/Board/commits{/sha}","git_commits_url":"https://api.github.com/repos/maragatchalian/Board/git/commits{/sha}","comments_url":"https://api.github.com/repos/maragatchalian/Board/comments{/number}","issue_comment_url":"https://api.github.com/repos/maragatchalian/Board/issues/comments{/number}","contents_url":"https://api.github.com/repos/maragatchalian/Board/contents/{+path}","compare_url":"https://api.github.com/repos/maragatchalian/Board/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maragatchalian/Board/merges","archive_url":"https://api.github.com/repos/maragatchalian/Board/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maragatchalian/Board/downloads","issues_url":"https://api.github.com/repos/maragatchalian/Board/issues{/number}","pulls_url":"https://api.github.com/repos/maragatchalian/Board/pulls{/number}","milestones_url":"https://api.github.com/repos/maragatchalian/Board/milestones{/number}","notifications_url":"https://api.github.com/repos/maragatchalian/Board/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maragatchalian/Board/labels{/name}","releases_url":"https://api.github.com/repos/maragatchalian/Board/releases{/id}","created_at":"2015-02-18T07:57:19Z","updated_at":"2015-03-26T10:15:41Z","pushed_at":"2015-03-26T10:15:42Z","git_url":"git://github.com/maragatchalian/Board.git","ssh_url":"git@github.com:maragatchalian/Board.git","clone_url":"https://github.com/maragatchalian/Board.git","svn_url":"https://github.com/maragatchalian/Board","homepage":null,"size":658,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"dev_1.1"}},"base":{"label":"maragatchalian:master","ref":"master","sha":"bdca9674839eb8587ec910778e139d05439ffda8","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},"repo":{"id":30956881,"name":"Board","full_name":"maragatchalian/Board","owner":{"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},"private":false,"html_url":"https://github.com/maragatchalian/Board","description":"","fork":false,"url":"https://api.github.com/repos/maragatchalian/Board","forks_url":"https://api.github.com/repos/maragatchalian/Board/forks","keys_url":"https://api.github.com/repos/maragatchalian/Board/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maragatchalian/Board/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maragatchalian/Board/teams","hooks_url":"https://api.github.com/repos/maragatchalian/Board/hooks","issue_events_url":"https://api.github.com/repos/maragatchalian/Board/issues/events{/number}","events_url":"https://api.github.com/repos/maragatchalian/Board/events","assignees_url":"https://api.github.com/repos/maragatchalian/Board/assignees{/user}","branches_url":"https://api.github.com/repos/maragatchalian/Board/branches{/branch}","tags_url":"https://api.github.com/repos/maragatchalian/Board/tags","blobs_url":"https://api.github.com/repos/maragatchalian/Board/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maragatchalian/Board/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maragatchalian/Board/git/refs{/sha}","trees_url":"https://api.github.com/repos/maragatchalian/Board/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maragatchalian/Board/statuses/{sha}","languages_url":"https://api.github.com/repos/maragatchalian/Board/languages","stargazers_url":"https://api.github.com/repos/maragatchalian/Board/stargazers","contributors_url":"https://api.github.com/repos/maragatchalian/Board/contributors","subscribers_url":"https://api.github.com/repos/maragatchalian/Board/subscribers","subscription_url":"https://api.github.com/repos/maragatchalian/Board/subscription","commits_url":"https://api.github.com/repos/maragatchalian/Board/commits{/sha}","git_commits_url":"https://api.github.com/repos/maragatchalian/Board/git/commits{/sha}","comments_url":"https://api.github.com/repos/maragatchalian/Board/comments{/number}","issue_comment_url":"https://api.github.com/repos/maragatchalian/Board/issues/comments{/number}","contents_url":"https://api.github.com/repos/maragatchalian/Board/contents/{+path}","compare_url":"https://api.github.com/repos/maragatchalian/Board/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maragatchalian/Board/merges","archive_url":"https://api.github.com/repos/maragatchalian/Board/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maragatchalian/Board/downloads","issues_url":"https://api.github.com/repos/maragatchalian/Board/issues{/number}","pulls_url":"https://api.github.com/repos/maragatchalian/Board/pulls{/number}","milestones_url":"https://api.github.com/repos/maragatchalian/Board/milestones{/number}","notifications_url":"https://api.github.com/repos/maragatchalian/Board/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maragatchalian/Board/labels{/name}","releases_url":"https://api.github.com/repos/maragatchalian/Board/releases{/id}","created_at":"2015-02-18T07:57:19Z","updated_at":"2015-03-26T10:15:41Z","pushed_at":"2015-03-26T10:15:42Z","git_url":"git://github.com/maragatchalian/Board.git","ssh_url":"git@github.com:maragatchalian/Board.git","clone_url":"https://github.com/maragatchalian/Board.git","svn_url":"https://github.com/maragatchalian/Board","homepage":null,"size":658,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"dev_1.1"}},"_links":{"self":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/2"},"html":{"href":"https://github.com/maragatchalian/Board/pull/2"},"issue":{"href":"https://api.github.com/repos/maragatchalian/Board/issues/2"},"comments":{"href":"https://api.github.com/repos/maragatchalian/Board/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maragatchalian/Board/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/maragatchalian/Board/statuses/d996d26b03787ece477c7c247b17b8be47a85200"}}}}