diff --git a/app/User.php b/app/User.php index ddcd1b7fa3..32901fd0b8 100644 --- a/app/User.php +++ b/app/User.php @@ -124,8 +124,8 @@ public function genQRcode(): array $google2fa = new Google2FA(); $qrinfo['secret'] = $google2fa->generateSecretKey(); $data = 'otpauth://totp/' . $this->user_id . '?secret=' . $qrinfo['secret'] . '&issuer=' . $_SERVER['SERVER_NAME']; - $qrinfo['qrcode'] = new QRCode(); - $qrinfo['qrcode'] = QRCode->render($data); + $qrcode = new QRCode(); + $qrinfo['qrcode'] = $qrcode->render($data); return $qrinfo; }