1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 07:40:29 +02:00

Possibilité d'accéder à la vue d'une autre personne sur la plateforme en tant qu'administrateur

This commit is contained in:
Yohann
2019-10-22 00:10:46 +02:00
parent b5f3c4ac58
commit b99e7586db
4 changed files with 42 additions and 5 deletions

View File

@ -41,6 +41,14 @@ if (isset($_POST["attribute_team"])) {
}
}
if (isset($_POST["view_as"]) && $_SESSION["role"] == Role::ADMIN) {
if (!isset($_SESSION["admin"]))
$_SESSION["admin"] = $_SESSION["user_id"];
$_SESSION["user_id"] = $user->getId();
header("Location: /");
exit();
}
class AttributeTeam
{
private $team_id;