aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-08-04 14:47:14 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-08-04 15:53:55 +0200
commit4865c52aa6018c377597e2ce466cc5e60121fe61 (patch)
tree791a3dd4a1598eecfe7fe23fd29ec9b7cfbb0de3 /lib/private
parentf80baf03d4003d6ac2857999ed08f82bb19071be (diff)
downloadnextcloud-server-4865c52aa6018c377597e2ce466cc5e60121fe61.tar.gz
nextcloud-server-4865c52aa6018c377597e2ce466cc5e60121fe61.zip
Fix isLoggedIn() check for user '0'
Fix #9972
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/user.php2
-rw-r--r--lib/private/user/session.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/user.php b/lib/private/user.php
index 5d3ebb57c8c..76f3497da0b 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -337,7 +337,7 @@ class OC_User {
* Checks if the user is logged in
*/
public static function isLoggedIn() {
- if (\OC::$session->get('user_id') && self::$incognitoMode === false) {
+ if (\OC::$session->get('user_id') !== null && self::$incognitoMode === false) {
return self::userExists(\OC::$session->get('user_id'));
}
return false;
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 5f0dee607ae..226f948efef 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -105,7 +105,7 @@ class Session implements Emitter, \OCP\IUserSession {
return $this->activeUser;
} else {
$uid = $this->session->get('user_id');
- if ($uid) {
+ if ($uid !== null) {
$this->activeUser = $this->manager->get($uid);
return $this->activeUser;
} else {