diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 04420d8..049a559 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -49,9 +49,6 @@ public function send(string $locale, Request $request, UserOtpService $otp): Red $email = Str::lower(trim($validated['email'])); - $userModel = config('auth.providers.users.model'); - $isNewAccount = ! $userModel::where('email', $email)->exists(); - try { $otp->generateAndSend($email); } catch (OtpThrottledException) { @@ -60,16 +57,6 @@ public function send(string $locale, Request $request, UserOtpService $otp): Red ]); } - // generateAndSend() just created the account: record that it happened - // under the login page's terms notice, and which versions it showed. - if ($isNewAccount) { - $userModel::where('email', $email)->update([ - 'terms_accepted_at' => now(), - 'terms_version' => config('legal.terms_version'), - 'privacy_policy_version' => config('legal.privacy_policy_version'), - ]); - } - $request->session()->put('login.email', $email); return redirect()->route('login.code'); diff --git a/app/Models/User.php b/app/Models/User.php index 7fd65fe..f2d1d11 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -46,7 +46,6 @@ protected function casts(): array { return [ 'email_verified_at' => 'datetime', - 'terms_accepted_at' => 'datetime', ]; } } diff --git a/database/migrations/2026_09_24_000002_add_terms_acceptance_to_users_table.php b/database/migrations/2026_09_24_000002_add_terms_acceptance_to_users_table.php deleted file mode 100644 index 55eb641..0000000 --- a/database/migrations/2026_09_24_000002_add_terms_acceptance_to_users_table.php +++ /dev/null @@ -1,29 +0,0 @@ -timestamp('terms_accepted_at')->nullable(); - $table->string('terms_version')->nullable(); - $table->string('privacy_policy_version')->nullable(); - }); - } - - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn(['terms_accepted_at', 'terms_version', 'privacy_policy_version']); - }); - } -}; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 0a25469..36ef0a7 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -42,9 +42,9 @@ /> - {{-- Shown to everyone; for a new account, LoginController::send() - records the time and the terms/privacy versions. Unescaped: the - label holds the two links (Language Lines, staff only). --}} + {{-- Shown to everyone. Recording acceptance for new accounts is a + boboko-core task (UserOtpService). Unescaped: the label holds the + two links (Language Lines, staff only). --}}
{!! __('storefront.auth.terms_notice', [ 'terms' => route('legal.terms'),