From d5c4c18ea0bd6c0d1a9d0104c1c17748a35f85a7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 4 Feb 2017 16:03:29 -0500 Subject: Add email address field for projects --- app/Model/ProjectModel.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Model/ProjectModel.php') diff --git a/app/Model/ProjectModel.php b/app/Model/ProjectModel.php index aba5eee2..080217cb 100644 --- a/app/Model/ProjectModel.php +++ b/app/Model/ProjectModel.php @@ -105,6 +105,22 @@ class ProjectModel extends Base return $this->db->table(self::TABLE)->eq('identifier', strtoupper($identifier))->findOne(); } + /** + * Get a project by the email address + * + * @access public + * @param string $email + * @return array|boolean + */ + public function getByEmail($email) + { + if (empty($email)) { + return false; + } + + return $this->db->table(self::TABLE)->eq('email', $email)->findOne(); + } + /** * Fetch project data by using the token * -- cgit v1.2.3