Let external auth win over session auth and session auth over http auth

refs #9660
This commit is contained in:
Eric Lippmann 2015-07-30 14:50:05 +02:00
parent 9060e8a034
commit feed927fd2
1 changed files with 5 additions and 6 deletions

View File

@ -87,14 +87,13 @@ class Auth
*/
public function isAuthenticated($ignoreSession = false)
{
if ($this->user === null
&& ! $this->authHttp()
&& ! $this->authExternal()
&& ! $ignoreSession
) {
if ($this->user === null && ! $ignoreSession) {
$this->authenticateFromSession();
}
return $this->user !== null;
if ($this->user === null && ! $this->authExternal()) {
return $this->authHttp();
}
return true;
}
public function setAuthenticated(User $user, $persist = true)