Author Topic

B Pierre

Friday 11 February 2011 7:26:31 am

Comment65813

In french : http://www.lolart.net/blog/ez-publish/utilisation-d-un-sso-dans-ez-publish

In english : http://share.ez.no/learn/ez-publish/using-a-sso-in-ez-publish

A simple sample :

"

public function handleSSOLogin()
{
$currentUser = false; // Valeur par defaut que l'on retourne si l'authentification échoue

//Si un utilisateur est authentifié on le récupère.
if (phpCAS::checkAuthentication())
{
$currentUser = eZUser::fetchByName(phpCAS::getUser());

//Si l'utilisateur n'est pas connu dans Exponential
if(!is_object( $currentUser ))
{
$currentUser=false;
}
}

return ($currentUser);
}

"