Skip to content
Snippets Groups Projects
Commit a33edcd2 authored by Thomas Müller's avatar Thomas Müller
Browse files

Fix singe user mode on public.php - take two

parent f05e1934
No related branches found
No related tags found
No related merge requests found
......@@ -301,7 +301,7 @@ class OC {
}
}
public static function checkSingleUserMode() {
public static function checkSingleUserMode($lockIfNoUserLoggedIn = false) {
if (!\OC::$server->getSystemConfig()->getValue('singleuser', false)) {
return;
}
......@@ -311,6 +311,10 @@ class OC {
if ($group->inGroup($user)) {
return;
}
} else {
if(!$lockIfNoUserLoggedIn) {
return;
}
}
// send http status 503
header('HTTP/1.1 503 Service Temporarily Unavailable');
......
......@@ -37,7 +37,7 @@ try {
}
OC::checkMaintenanceMode();
OC::checkSingleUserMode();
OC::checkSingleUserMode(true);
$request = \OC::$server->getRequest();
$pathInfo = $request->getPathInfo();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment