revive phpcas

This commit is contained in:
thaaoblues 2023-07-02 17:04:33 +02:00
parent c8c6e527a4
commit 7ed2737fd4

View file

@ -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 = ?");