public function ServerVariableLookup::getAuthenticationNameFromServer in LDAP Single Sign On 8.4
Same name in this branch
- 8.4 src/ServerVariableLookup.php \Drupal\ldap_sso\ServerVariableLookup::getAuthenticationNameFromServer()
- 8.4 tests/modules/ldap_sso_dummy_ldap/src/ServerVariableLookup.php \Drupal\ldap_sso_dummy_ldap\ServerVariableLookup::getAuthenticationNameFromServer()
Get authentication name from override or server variable.
Parameters
string|null $variable: SSO variable to check, such as REMOTE_USER.
Return value
string|null Authentication name.
Overrides ServerVariableLookupInterface::getAuthenticationNameFromServer
File
- src/
ServerVariableLookup.php, line 15
Class
- ServerVariableLookup
- Helper function to make dummy data available in functional tests.
Namespace
Drupal\ldap_ssoCode
public function getAuthenticationNameFromServer(?string $variable) : ?string {
$remote_user = NULL;
if (isset($_SERVER[$variable])) {
$remote_user = $_SERVER[$variable];
}
return $remote_user;
}