summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/user.php7
-rw-r--r--lib/private/user/session.php5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/user.php b/lib/private/user.php
index 17b84d1f93e..d66354b247d 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -343,7 +343,14 @@ class OC_User {
*/
public static function setIncognitoMode($status) {
self::$incognitoMode = $status;
+ }
+ /**
+ * get incognito mode status
+ * @return bool
+ */
+ public static function isIncognitoMode() {
+ return self::$incognitoMode;
}
/**
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 53662d00952..9324ef2f42c 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -124,6 +124,11 @@ class Session implements IUserSession, Emitter {
* @return \OC\User\User
*/
public function getUser() {
+ // FIXME: This is a quick'n dirty work-around for the incognito mode as
+ // described at https://github.com/owncloud/core/pull/12912#issuecomment-67391155
+ if (\OC_User::isIncognitoMode()) {
+ return null;
+ }
if ($this->activeUser) {
return $this->activeUser;
} else {