Don't to set the cookie it wasn't needed.

This commit is contained in:
josh4trunks 2014-03-23 20:05:06 -07:00
parent 4ddf5d92f2
commit 63df8354da
1 changed files with 1 additions and 1 deletions

View File

@ -745,7 +745,7 @@ class OC {
if (isset($_COOKIE['oc_ignore_php_auth_user'])) {
// Ignore HTTP Authentication for 5 more mintues.
setcookie('oc_ignore_php_auth_user', '', time() + 300, $cookie_path);
} else {
} elseif ($_SERVER['PHP_AUTH_USER'] === self::$session->get('loginname')) {
// Ignore HTTP Aunthentication to allow a different user to log in.
setcookie('oc_ignore_php_auth_user', $_SERVER['PHP_AUTH_USER'], 0, $cookie_path);
}