diff --git a/pages/security.php b/pages/security.php index 414d661..d1bb78e 100644 --- a/pages/security.php +++ b/pages/security.php @@ -12,6 +12,7 @@ use Endroid\QrCode\QrCode; $user = new User($_SESSION['uid']); ?>
+
@@ -29,6 +30,7 @@ $user = new User($_SESSION['uid']);
+ @@ -53,14 +55,17 @@ $user = new User($_SESSION['uid']); +
-
+
get("setup 2fa"); ?>
- has2fa()) { - ?> -
+
+
+ has2fa()) { + ?> +
get("2fa active") ?>
@@ -68,21 +73,22 @@ $user = new User($_SESSION['uid']);
- 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"); ?> + +
+
\ No newline at end of file