Skip to content
Snippets Groups Projects
Commit e3230b5b authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add ultra-slim hack for incognito mode

parent 3d006207
No related branches found
No related tags found
No related merge requests found
......@@ -342,7 +342,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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment