From 706dd6523e27d852412f58188434d27d34d7cb87 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sat, 22 Oct 2022 20:06:44 -0400 Subject: [PATCH] Replace recovery token repository --- .../Eloquent/RecoveryTokenRepository.php | 13 ------------- app/Services/Users/ToggleTwoFactorService.php | 9 ++++----- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 app/Repositories/Eloquent/RecoveryTokenRepository.php diff --git a/app/Repositories/Eloquent/RecoveryTokenRepository.php b/app/Repositories/Eloquent/RecoveryTokenRepository.php deleted file mode 100644 index 5d4dc4850..000000000 --- a/app/Repositories/Eloquent/RecoveryTokenRepository.php +++ /dev/null @@ -1,13 +0,0 @@ -recoveryTokenRepository->deleteWhere(['user_id' => $user->id]); + $user->recoveryTokens()->delete(); // Bulk insert the hashed tokens. - $this->recoveryTokenRepository->insert($inserts); + RecoveryToken::query()->insert($inserts); } $this->repository->withoutFreshModel()->update($user->id, [