Skip to content

Commit 7992b79

Browse files
authored
Merge pull request #17 from VanOns/feature/add-statamic-2fa-config
Add flag to handle Statamic 2FA
2 parents 252d8d2 + 5f48953 commit 7992b79

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

config/environment-importer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
// 'preserve_emails' => ['@example.com', 'john@doe.com'],
212212
// 'email_domain' => 'example.com',
213213
// 'password_override' => 'password',
214+
// 'handle_statamic_2fa' => false,
214215
//],
215216
],
216217

src/Processors/Data/AnonymizeUsers.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ protected function generateUniqueValue(string $table, string $column, string $va
102102
*/
103103
protected function maybeHandleStatamicTwoFactor(Authenticatable|Model $user): void
104104
{
105+
if (! ((bool) ($this->options['handle_statamic_2fa'] ?? true))) {
106+
return;
107+
}
108+
105109
if (!class_exists('Statamic\Facades\User') || !class_exists('MityDigital\StatamicTwoFactor\Actions\DisableTwoFactorAuthentication')) {
106110
return;
107111
}

0 commit comments

Comments
 (0)