25 include_once(
"Auth/Auth.php");
45 if ($a_params[
"sessionName"] !=
"")
47 parent::Auth(
"", array(
"sessionName" => $a_params[
"sessionName"]));
54 include_once(
"./Services/CAS/lib/CAS/CAS.php");
56 $this->server_hostname = $a_params[
"server_hostname"];
57 $this->server_port = (int) $a_params[
"server_port"];
58 $this->server_uri = $a_params[
"server_uri"];
63 $this->server_port, (
string) $this->server_uri);
76 return $PHPCAS_CLIENT->isAuthenticated();
222 include_once(
'./Services/User/classes/class.ilObjUser.php');
225 if ($local_user !=
"")
231 if (!$ilSetting->get(
"cas_create_users"))
242 $newUser[
"firstname"] = $local_user;
243 $newUser[
"lastname"] =
"";
245 $newUser[
"login"] = $local_user;
248 $newUser[
"passwd"] =
"";
252 $newUser[
"auth_mode"] =
"cas";
254 $newUser[
"profile_incomplete"] = 1;
257 $userObj->assignData($newUser);
258 $userObj->setTitle($userObj->getFullname());
259 $userObj->setDescription($userObj->getEmail());
262 $userObj->setLanguage($ilSetting->get(
"language"));
265 $userObj->setTimeLimitOwner(7);
266 $userObj->setTimeLimitUnlimited(1);
267 $userObj->setTimeLimitFrom(time());
268 $userObj->setTimeLimitUntil(time());
271 $userObj->setOwner(6);
273 $userObj->setActive(1, 6);
275 $userObj->updateOwner();
278 $userObj->saveAsNew();
281 $userObj->writePrefs();
284 $rbacadmin->assignUser($ilSetting->get(
'cas_user_default_role'), $userObj->getId(),
true);