/** * A method to return the project id associated with a user * If the user has more projects (supervisor), the first is returned * @return null */ public function getProjectId() { # Get Project object and its ID if ($projectId = ProjectFactory::getProjectWithUserId($this->ID)) { return $projectId->getID(); } return null; }