diff --git a/balise/login_saml.php b/balise/login_saml.php index e8b7827..9ae7bf5 100644 --- a/balise/login_saml.php +++ b/balise/login_saml.php @@ -53,11 +53,12 @@ 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['Nom'][0]; + $last_name = $attributes['sn'][0]; $email = $attributes['email'][0]; - $given_name = $first_name . ' ' . $last_name; + $display_name = $first_name . ' ' . $last_name; spip_log("[auth_saml] authentification reussi pour l'utilisateur =".$login); @@ -70,7 +71,7 @@ function login_saml_successfull() if ($row_auteur) { $GLOBALS['auteur_session'] = $row_auteur; - spip_log("[auth_saml] updating user [" . $login . "] attributes : ". $given_name); + spip_log("[auth_saml] updating user [" . $login . "] attributes : ". $display_name); spip_query("UPDATE spip_auteurs SET nom=" . _q($display_name) . ", email=" . _q($email) . " WHERE login="._q($login)); $session = charger_fonction('session', 'inc');