Not sure why I keep calling this tool nestor, it's called rector

This commit is contained in:
James Cole
2025-05-24 05:52:31 +02:00
parent 1c33be4828
commit b8e33201bd
8 changed files with 25 additions and 14 deletions

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Auth;
use Carbon\Carbon;
use FireflyIII\Events\Security\MFABackupFewLeft;
use FireflyIII\Events\Security\MFABackupNoLeft;
use FireflyIII\Events\Security\MFAManyFailedAttempts;
@@ -129,7 +130,7 @@ class TwoFactorController extends Controller
*/
private function inMFAHistory(string $mfaCode, array $mfaHistory): bool
{
$now = time();
$now = Carbon::now()->getTimestamp();
foreach ($mfaHistory as $entry) {
$time = $entry['time'];
$code = $entry['code'];
@@ -149,7 +150,7 @@ class TwoFactorController extends Controller
/** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data;
$newHistory = [];
$now = time();
$now = Carbon::now()->getTimestamp();
foreach ($mfaHistory as $entry) {
$time = $entry['time'];
$code = $entry['code'];
@@ -184,7 +185,7 @@ class TwoFactorController extends Controller
/** @var array $mfaHistory */
$mfaHistory = app('preferences')->get('mfa_history', [])->data;
$entry = [
'time' => time(),
'time' => Carbon::now()->getTimestamp(),
'code' => $mfaCode,
];
$mfaHistory[] = $entry;