Ive written a php web site that is acessed through moodle. Its designed for the students to use to view their details we have stored against them. We have our moodle site using LDAP. and from this I'm assuming a session cookie is created?
I want to call and use this session cookie to use on my added site as again i'm assuming the session cookie is storing the students username etc, which I can then hopefully use to query the database.
Does anybody know what the cookie is called and what the variables within the cookie are called? so I can use it like the following:-
<?php #call for cookies
$auth = $_COOKIE['auth'];
$student_id = $_COOKIE['student_id'];
header("Cache-Control:no-cache");
if(!$auth == "ok")
{ header("Location:../index.php");
exit();
}
?>
Failing that does anybody know how I can carry the parameters from moodle and use them in a new cookie that I create?
Many Thanks