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 2882ac94ea9..f386d03ab1b 100644
--- a/lib/private/legacy/json.php
+++ b/lib/private/legacy/json.php
@@ -68,7 +68,7 @@ class OC_JSON{
public static function checkLoggedIn() {
$twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager();
if( !OC_User::isLoggedIn()
- || $twoFactorAuthManger->needsSecondFactor()) {
+ || $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
$l = \OC::$server->getL10N('lib');
http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED);
self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' )));