diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-04 16:03:29 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-04 16:03:29 -0500 |
commit | d5c4c18ea0bd6c0d1a9d0104c1c17748a35f85a7 (patch) | |
tree | 313e42064e41c0b4da565d98992f5aa2933dd8ed /app/Model/ProjectModel.php | |
parent | 8eac12188865f380439a40549e6e6ed58c3f405c (diff) |
Add email address field for projects
Diffstat (limited to 'app/Model/ProjectModel.php')
-rw-r--r-- | app/Model/ProjectModel.php | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -106,6 +106,22 @@ class ProjectModel extends Base } /** + * 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 * * @access public |