fix timings
This commit is contained in:
@@ -27,6 +27,8 @@ class EmailSubscribe extends Component
|
|||||||
|
|
||||||
public function subscribe(): void
|
public function subscribe(): void
|
||||||
{
|
{
|
||||||
|
$this->validate();
|
||||||
|
|
||||||
// 1. Honeypot - if this hidden field is filled, treat as success but do nothing
|
// 1. Honeypot - if this hidden field is filled, treat as success but do nothing
|
||||||
if (! empty($this->trap)) {
|
if (! empty($this->trap)) {
|
||||||
$this->reset(['email', 'trap']);
|
$this->reset(['email', 'trap']);
|
||||||
@@ -67,9 +69,6 @@ class EmailSubscribe extends Component
|
|||||||
}
|
}
|
||||||
session(['subscribe_attempts' => $attempts + 1]);
|
session(['subscribe_attempts' => $attempts + 1]);
|
||||||
|
|
||||||
|
|
||||||
$this->validate();
|
|
||||||
|
|
||||||
// Look up existing subscription by email
|
// Look up existing subscription by email
|
||||||
$subscription = EmailSubscriptions::where('email', $this->email)->first();
|
$subscription = EmailSubscriptions::where('email', $this->email)->first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user