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

Mails groupés

This commit is contained in:
Yohann
2019-12-13 19:50:32 +01:00
parent 79400ca298
commit 7e02a2dd2a
6 changed files with 49 additions and 10 deletions

View File

@ -237,4 +237,18 @@ class Team
return $docs;
}
public function getAllEmails()
{
$emails = [];
if ($this->getEncadrantId() != null)
$emails[] = User::fromId($this->getEncadrantId())->getEmail();
foreach ($this->getParticipants() as $participantId) {
if ($participantId != 0)
$emails[] = User::fromId($participantId)->getEmail();
}
return $emails;
}
}