Allow full name to be retrieved by SSO ReverseProxy
Expand on #4585 by also getting the user's full name from the Reverse Proxy: If a ReverseProxy provides more than REMOTE_USER, such as email, it might as well also provide the user's full name.
This commit is contained in:
@@ -44,10 +44,11 @@ class ReverseProxyAuth extends Base implements PreAuthenticationProviderInterfac
|
||||
{
|
||||
$username = $this->request->getRemoteUser();
|
||||
$email = $this->request->getRemoteEmail();
|
||||
$fullname = $this->request->getRemoteName();
|
||||
|
||||
if (! empty($username)) {
|
||||
$userProfile = $this->userCacheDecorator->getByUsername($username);
|
||||
$this->userInfo = new ReverseProxyUserProvider($username, $email, $userProfile ?: array());
|
||||
$this->userInfo = new ReverseProxyUserProvider($username, $email, $fullname, $userProfile ?: array());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user