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