return false if user is in incognito mode

This commit is contained in:
Bjoern Schiessle 2013-11-27 16:52:30 +01:00
parent 40231c08cf
commit 6deda1b9f6
1 changed files with 2 additions and 2 deletions

View File

@ -314,7 +314,7 @@ class OC_User {
* Checks if the user is logged in
*/
public static function isLoggedIn() {
if (\OC::$session->get('user_id')) {
if (\OC::$session->get('user_id') && self::$incognitoMode === false) {
OC_App::loadApps(array('authentication'));
self::setupBackends();
return self::userExists(\OC::$session->get('user_id'));
@ -353,7 +353,7 @@ class OC_User {
* @return bool
*/
public static function isAdminUser($uid) {
if (OC_Group::inGroup($uid, 'admin')) {
if (OC_Group::inGroup($uid, 'admin') && self::$incognitoMode === false) {
return true;
}
return false;