mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 08:22:10 +01:00 
			
		
		
		
	Usurpation d'identité
This commit is contained in:
		@@ -19,27 +19,12 @@ function loadUserValues()
 | 
			
		||||
			$_SESSION["tournament"] = Tournament::fromId($team->getTournamentId());
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (isset($_GET["be-admin"])) {
 | 
			
		||||
			quitTeam();
 | 
			
		||||
			$user->setRole(Role::ADMIN);
 | 
			
		||||
			exit();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (isset($_GET["be-organizer"])) {
 | 
			
		||||
			quitTeam();
 | 
			
		||||
			$user->setRole(Role::ORGANIZER);
 | 
			
		||||
			exit();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (isset($_GET["be-participant"])) {
 | 
			
		||||
			quitTeam();
 | 
			
		||||
			$user->setRole(Role::PARTICIPANT);
 | 
			
		||||
			exit();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (isset($_GET["be-encadrant"])) {
 | 
			
		||||
			quitTeam();
 | 
			
		||||
			$user->setRole(Role::ENCADRANT);
 | 
			
		||||
		if (isset($_GET["view-as-admin"])) {
 | 
			
		||||
			if (isset($_SESSION["admin"])) {
 | 
			
		||||
				$_SESSION["user_id"] = $_SESSION["admin"];
 | 
			
		||||
				unset($_SESSION["admin"]);
 | 
			
		||||
			}
 | 
			
		||||
			header("Location: /");
 | 
			
		||||
			exit();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user