plateforme-tfjm2/server_files/controllers/profils.php

16 lines
432 B
PHP
Raw Normal View History

2019-12-26 21:30:42 +00:00
<?php
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::ADMIN)
require_once "server_files/403.php";
$orphans = isset($_GET["orphans"]);
$users = $orphans ? User::getOrphanUsers() : User::getAllUsers();
2020-04-13 01:41:15 +00:00
$emails = [];
if ($_SESSION["role"] == Role::ORGANIZER || $_SESSION["role"] == Role::ADMIN) {
foreach ($users as $user)
$emails[] = $user->getEmail();
}
2019-12-26 21:30:42 +00:00
require_once "server_files/views/profils.php";