login_saml: test if we have a nameid in saml attributes

This commit is contained in:
Jérôme Schneider 2015-04-03 17:05:58 +02:00
parent 87890ad297
commit a162b120ae
1 changed files with 6 additions and 1 deletions

View File

@ -72,6 +72,11 @@ function login_saml_successfull()
$nameid = $attributes['NameID'][0];
$display_name = $first_name . ' ' . $last_name;
if (!$nameid) {
spip_log("[auth_saml] no NameID found in SAML attributes, cancel login", _LOG_ERREUR);
redirige_par_entete('/');
}
spip_log("[auth_saml] authentification reussi pour l'utilisateur =".$email);
// Si l'utilisateur figure deja dans la base, y recuperer les infos