From 7ed2737fd47a5747c9863db2493c4b62ebc885f9 Mon Sep 17 00:00:00 2001 From: thaaoblues Date: Sun, 2 Jul 2023 17:04:33 +0200 Subject: [PATCH] revive phpcas --- admin/index.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/admin/index.php b/admin/index.php index 5c6d5c2..eb59d14 100644 --- a/admin/index.php +++ b/admin/index.php @@ -4,14 +4,7 @@ include "script.php"; //CAS require_once("../phpCAS-1.3.6/CAS.php"); -$_SESSION['id']=1; -$pseudo = "mougnibas"; -$user = array( - "pseudo"=>$pseudo, - "perm"=>3 -); -/* // Initialize phpCAS phpCAS::client(CAS_VERSION_2_0, "cas.insa-toulouse.fr", 443, 'cas', true); @@ -25,7 +18,7 @@ phpCAS::forceAuthentication(); // at this step, the user has been authenticated by the CAS server // and the user's login name can be read with phpCAS::getUser(). -$pseudo = phpCAS::getUser();*/ +$pseudo = phpCAS::getUser(); if(!isset($_SESSION['id'])) { $req = $db->prepare("SELECT id FROM admin WHERE pseudo = ?");