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:
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user