Skip to content
Snippets Groups Projects
Commit 4865c52a authored by Joas Schilling's avatar Joas Schilling
Browse files

Fix isLoggedIn() check for user '0'

Fix #9972
parent f80baf03
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment