1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-24 23:00:29 +02:00

Possibilité d'encadrer plusieurs équipes

This commit is contained in:
Yohann
2019-12-04 11:45:14 +01:00
parent 8fa1183f9f
commit 95d7f30536
20 changed files with 185 additions and 42 deletions

View File

@ -301,4 +301,18 @@ class User
return $docs;
}
// Seulement pour les encadrants
public function getTeams()
{
global $DB;
$req = $DB->query("SELECT `id` FROM `teams` WHERE `encadrant` = $this->id;");
$teams = [];
while (($data =$req->fetch()) !== false)
$teams[] = Team::fromId($data["id"]);
return $teams;
}
}