Commit f671b232 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #12923 from owncloud/ultra-slim-version-of-incognito-mode

Add ultra-slim hack for incognito mode
parents 2d647973 e3230b5b
......@@ -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;
}
/**
......
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment