slo: fix simplesmalphp call
This commit is contained in:
parent
143d389a1a
commit
af1460a617
|
@ -14,10 +14,15 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
|
|||
|
||||
include_spip('inc/cookie');
|
||||
|
||||
/* Loading simplesamlphp */
|
||||
include_spip('inc/simplesamlphp/lib/_autoload');
|
||||
|
||||
// http://doc.spip.org/@action_logout_dist
|
||||
function action_logout_dist()
|
||||
{
|
||||
global $auteur_session, $ignore_auth_http, $simplesaml;
|
||||
global $auteur_session, $ignore_auth_http;
|
||||
|
||||
$simplesaml = new SimpleSAML_Auth_Simple('default-sp');
|
||||
$logout =_request('logout');
|
||||
$url = _request('url');
|
||||
spip_log("logout $logout $url" . $auteur_session['id_auteur']);
|
||||
|
|
|
@ -53,7 +53,6 @@ function login_saml_successfull()
|
|||
spip_log("[auth_saml] Traitement login SAML");
|
||||
|
||||
$attributes = $simplesaml->getAttributes();
|
||||
spip_log("ATTRIBUTES: " . print_r($attributes, true));
|
||||
$login = $attributes['uid'][0];
|
||||
$first_name = $attributes['gn'][0];
|
||||
$last_name = $attributes['sn'][0];
|
||||
|
@ -71,7 +70,8 @@ function login_saml_successfull()
|
|||
if ($row_auteur) {
|
||||
$GLOBALS['auteur_session'] = $row_auteur;
|
||||
|
||||
spip_log("[auth_saml] updating user [" . $login . "] attributes : ". $display_name);
|
||||
spip_log("[auth_saml] updating user [" . $login . "]");
|
||||
spip_log("[auth_saml] display name : $display_name and email : $email");
|
||||
spip_query("UPDATE spip_auteurs SET nom=" . _q($display_name) . ", email=" . _q($email) . " WHERE login="._q($login));
|
||||
|
||||
$session = charger_fonction('session', 'inc');
|
||||
|
|
Reference in New Issue