diff --git a/modules/core/www/authenticate.php b/modules/core/www/authenticate.php
index c1b9e1b313b97dfda9fe490e71cce008f4cb9377..8b52e786c6d814bda7b6a823665853bd4f3e4bf8 100644
--- a/modules/core/www/authenticate.php
+++ b/modules/core/www/authenticate.php
@@ -52,7 +52,7 @@ $t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
 $t->data['header'] = '{status:header_saml20_sp}';
 $t->data['attributes'] = $attributes;
 // if saml:sp:IdP is set, this is SAML auth so we can pass a NameId
-$t->data['nameid'] = !is_null( $as->getAuthData('saml:sp:IdP') ) ? $as->getAuthData('saml:sp:NameID') : FALSE;
+$t->data['nameid'] = !is_null( $as->getAuthData('saml:sp:NameID') ) ? $as->getAuthData('saml:sp:NameID') : FALSE;
 $t->data['logouturl'] = \SimpleSAML\Utils\HTTP::getSelfURLNoQuery() . '?as=' . urlencode($asId) . '&logout';
 $t->show();