Authentication\Manager: fix fromRemoteUser boolean

This used to be always true in case an autologin backend was enabled.
We only have a REMOTE_USER if there is such.
This commit is contained in:
Thomas Gelf 2014-06-20 12:58:17 +02:00
parent 559457f730
commit 4bada86731
1 changed files with 3 additions and 1 deletions

View File

@ -237,7 +237,9 @@ class Manager
*/
public function authenticateFromRemoteUser()
{
$this->fromRemoteUser = true;
if (array_key_exists('REMOTE_USER', $_SERVER)) {
$this->fromRemoteUser = true;
}
$this->authenticateFromSession();
if ($this->user !== null) {
if (array_key_exists('REMOTE_USER', $_SERVER) && $this->user->getUsername() !== $_SERVER["REMOTE_USER"]) {