generated from boboko/starter
reverted a migration and some 3dealer functionality that should be in core
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -46,7 +46,6 @@ protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'terms_accepted_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user