From 06d0b7048ebcdfdf6e24eec3ac7dc8fb0327dd6f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 30 Jun 2014 21:52:02 -0300 Subject: Merge pull-request: Github authentication #162 --- app/Model/User.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/Model/User.php') diff --git a/app/Model/User.php b/app/Model/User.php index 8769d69a..ba1acb90 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -51,6 +51,18 @@ class User extends Base return $this->db->table(self::TABLE)->eq('google_id', $google_id)->findOne(); } + /** + * Get a specific user by the GitHub id + * + * @access public + * @param string $github_id GitHub user id + * @return array + */ + public function getByGitHubId($github_id) + { + return $this->db->table(self::TABLE)->eq('github_id', $github_id)->findOne(); + } + /** * Get a specific user by the username * -- cgit v1.2.3