+
get("setup 2fa"); ?>
- has2fa()) {
- ?>
-
+
+
+ has2fa()) {
+ ?>
+
get("2fa active") ?>
- generate2fa();
- $label = $SETTINGS['system_name'] . ":" . is_null($user->getEmail()) ? $user->getName() : $user->getEmail();
- $issuer = $SETTINGS['system_name'];
- $qrCode = new QrCode($codeuri);
- $qrCode->setWriterByName('svg');
- $qrCode->setSize(550);
- $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
- $qrcode = $qrCode->writeDataUri();
- $totp = Factory::loadFromProvisioningUri($codeuri);
- $codesecret = $totp->getSecret();
- $chunk_secret = trim(chunk_split($codesecret, 4, ' '));
- ?>
-
+
+ generate2fa();
+ $label = $SETTINGS['system_name'] . ":" . is_null($user->getEmail()) ? $user->getName() : $user->getEmail();
+ $issuer = $SETTINGS['system_name'];
+ $qrCode = new QrCode($codeuri);
+ $qrCode->setWriterByName('svg');
+ $qrCode->setSize(550);
+ $qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH);
+ $qrcode = $qrCode->writeDataUri();
+ $totp = Factory::loadFromProvisioningUri($codeuri);
+ $codesecret = $totp->getSecret();
+ $chunk_secret = trim(chunk_split($codesecret, 4, ' '));
+ ?>
+
get("scan 2fa qrcode") ?>
@@ -120,15 +126,17 @@ $user = new User($_SESSION['uid']);
-
- get("2fa explained"); ?>
-
-
- get("enable 2fa"); ?>
-
+
+ get("2fa explained"); ?>
+
+
+ get("enable 2fa"); ?>
+
+