diff --git a/oic_login.php b/oic_login.php index ae3babc..57b4e08 100644 --- a/oic_login.php +++ b/oic_login.php @@ -1,15 +1,11 @@ setHttpUpgradeInsecureRequests(false); } +$oidc->addScope('profile','email'); $oidc->authenticate(); $_SESSION['oidcClient'] = $oidc; // Set session variable username -$firstname = $oidc->requestUserInfo('given_name'); -$surname = $oidc->requestUserInfo('family_name'); -$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); +#$firstname = $oidc->requestUserInfo('given_name'); +#$surname = $oidc->requestUserInfo('family_name'); +#$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); +# +#$_SESSION['username'] = $initials; -$_SESSION['username'] = $initials; +$_SESSION['username'] = $oidc->requestUserInfo('email'); header("Location: interface.php");