fix mfa model
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once '../plugins/totp/totp.php';
|
require_once '../../plugins/totp/totp.php';
|
||||||
|
|
||||||
// Only generate the token once and store it in session:
|
// Only generate the token once and store it in session:
|
||||||
if (empty($_SESSION['mfa_token'])) {
|
if (empty($_SESSION['mfa_token'])) {
|
||||||
@@ -27,7 +27,7 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<img src='../plugins/barcode/barcode.php?f=png&s=qr&d=<?php echo $data; ?>'>
|
<img src='../../plugins/barcode/barcode.php?f=png&s=qr&d=<?php echo $data; ?>'>
|
||||||
<p><span class='text-secondary'>Secret:</span> <?php echo $token; ?>
|
<p><span class='text-secondary'>Secret:</span> <?php echo $token; ?>
|
||||||
<button type="button" class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $token; ?>'><i class='far fa-copy text-secondary'></i></button>
|
<button type="button" class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $token; ?>'><i class='far fa-copy text-secondary'></i></button>
|
||||||
</p>
|
</p>
|
||||||
@@ -51,3 +51,4 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ $remember_token_count = mysqli_num_rows($sql_remember_tokens);
|
|||||||
<i class="fas fa-lock mr-2"></i>Enable MFA
|
<i class="fas fa-lock mr-2"></i>Enable MFA
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<?php require_once "/modals/user_mfa_modal.php"; ?>
|
<?php require_once "modals/user_mfa_modal.php"; ?>
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a href="post.php?disable_mfa&csrf_token=<?php echo $_SESSION['csrf_token'] ?>" class="btn btn-danger"><i class="fas fa-unlock mr-2"></i>Disable MFA</a>
|
<a href="post.php?disable_mfa&csrf_token=<?php echo $_SESSION['csrf_token'] ?>" class="btn btn-danger"><i class="fas fa-unlock mr-2"></i>Disable MFA</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user