summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 41ff1870059..c898273d9e2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -352,6 +352,10 @@ class OC{
OC_User::useBackend(new OC_User_Database());
OC_Group::useBackend(new OC_Group_Database());
+ if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SESSION['user_id']) && $_SERVER['PHP_AUTH_USER'] != $_SESSION['user_id']) {
+ OC_User::logout();
+ }
+
// Load Apps
// This includes plugins for users and filesystems as well
global $RUNTIME_NOAPPS;