mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-24 15:40:27 +02:00
Page comptes orphelins & menu déroulant
This commit is contained in:
@ -64,6 +64,21 @@ class User
|
||||
|
||||
return $admins;
|
||||
}
|
||||
|
||||
public static function getOrphanUsers()
|
||||
{
|
||||
global $DB, $YEAR;
|
||||
$orphans = [];
|
||||
$req = $DB->query("SELECT * FROM `users` WHERE `role` != 'ADMIN' AND `team_id` IS NULL AND `year` = $YEAR ORDER BY `role`, `inscription_date`;");
|
||||
|
||||
while (($data = $req->fetch()) !== false) {
|
||||
$orphan = new User();
|
||||
$orphan->fill($data);
|
||||
$orphans[] = $orphan;
|
||||
}
|
||||
|
||||
return $orphans;
|
||||
}
|
||||
|
||||
private function fill($data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user