1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-29 13:41:04 +02:00

Changement confinement

This commit is contained in:
Yohann D'ANELLO
2020-04-13 03:41:15 +02:00
parent a86bc3f124
commit 50aec3c105
13 changed files with 104 additions and 25 deletions

View File

@ -121,8 +121,7 @@ class User
{
global $DB, $YEAR;
$users = [];
$req = $DB->query("SELECT * FROM `users` WHERE (`role` = 'PARTICIPANT' OR `role` = 'ENCADRANT') "
. "AND `year` = $YEAR ORDER BY `role`, `inscription_date`;");
$req = $DB->query("SELECT * FROM `users` WHERE `year` = $YEAR ORDER BY `role` DESC, `inscription_date`;");
while (($data = $req->fetch()) !== false) {
$orphan = new User();
@ -455,8 +454,8 @@ class User
$team = Team::fromId($this->team_id);
$tournament = $team->getEffectiveTournament();
$req = $DB->prepare("SELECT `id` FROM `payments` WHERE `user` = ? AND `tournament` = ?;");
$req->execute([$this->id, $tournament->getId()]);
$req = $DB->prepare("SELECT `id` FROM `payments` WHERE `user` = ?;");
$req->execute([$this->id]);
if (($data = $req->fetch()) !== false)
return Payment::fromId($data["id"]);