Add email address field for projects

This commit is contained in:
Frederic Guillot
2017-02-04 16:03:29 -05:00
parent 8eac121888
commit d5c4c18ea0
36 changed files with 198 additions and 9 deletions

View File

@@ -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
*