forked from rebillar/site-accueil-insa
revive phpcas
This commit is contained in:
parent
c8c6e527a4
commit
7ed2737fd4
1 changed files with 1 additions and 8 deletions
|
@ -4,14 +4,7 @@ include "script.php";
|
||||||
//CAS
|
//CAS
|
||||||
require_once("../phpCAS-1.3.6/CAS.php");
|
require_once("../phpCAS-1.3.6/CAS.php");
|
||||||
|
|
||||||
$_SESSION['id']=1;
|
|
||||||
$pseudo = "mougnibas";
|
|
||||||
$user = array(
|
|
||||||
"pseudo"=>$pseudo,
|
|
||||||
"perm"=>3
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Initialize phpCAS
|
// Initialize phpCAS
|
||||||
phpCAS::client(CAS_VERSION_2_0, "cas.insa-toulouse.fr", 443, 'cas', true);
|
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
|
// at this step, the user has been authenticated by the CAS server
|
||||||
// and the user's login name can be read with phpCAS::getUser().
|
// and the user's login name can be read with phpCAS::getUser().
|
||||||
$pseudo = phpCAS::getUser();*/
|
$pseudo = phpCAS::getUser();
|
||||||
|
|
||||||
if(!isset($_SESSION['id'])) {
|
if(!isset($_SESSION['id'])) {
|
||||||
$req = $db->prepare("SELECT id FROM admin WHERE pseudo = ?");
|
$req = $db->prepare("SELECT id FROM admin WHERE pseudo = ?");
|
||||||
|
|
Loading…
Reference in a new issue