Skip to content

Commit

Permalink
Fixing spacing in here
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwhizz committed Nov 25, 2024
1 parent 9e540c6 commit c77f472
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public function genQRcode(): array
$qrinfo = array();
$google2fa = new Google2FA();
$qrinfo['secret'] = $google2fa->generateSecretKey();
$servername = $_SERVER['SERVER_NAME'];
settype($servername, "string");
$servername = $_SERVER['SERVER_NAME'];
settype($servername, "string");
$data = 'otpauth://totp/' . $this->user_id . '?secret=' . $qrinfo['secret'] . '&issuer=' . $servername;
$qrcode = new QRCode();
$qrinfo['qrcode'] = $qrcode->render($data);
Expand Down Expand Up @@ -293,10 +293,10 @@ public function check2facode(string $code2fa): bool
$secret = DB::table('user')
->where('user_id', '=', $this->id())
->value('secret');
settype($secret, "string");
settype($secret, "string");
$google2fa = new Google2FA();
$googleverifystatus = $google2fa->verifyKey($secret, $code2fa);
settype($googleverifystatus, "bool");
$googleverifystatus = $google2fa->verifyKey($secret, $code2fa);
settype($googleverifystatus, "bool");
if ($googleverifystatus) {
return true;
}
Expand Down

0 comments on commit c77f472

Please sign in to comment.