summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/json.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/json.php')
-rw-r--r--lib/private/legacy/json.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/legacy/json.php b/lib/private/legacy/json.php
index f386d03ab1b..0e598a68ee1 100644
--- a/lib/private/legacy/json.php
+++ b/lib/private/legacy/json.php
@@ -67,7 +67,7 @@ class OC_JSON{
*/
public static function checkLoggedIn() {
$twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager();
- if( !OC_User::isLoggedIn()
+ if( !\OC::$server->getUserSession()->isLoggedIn()
|| $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
$l = \OC::$server->getL10N('lib');
http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED);