mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Rework email_activation model, get rid of behaviors, use json column to store additional data
This commit is contained in:
@@ -51,7 +51,7 @@ class ForgotPasswordForm extends ApiForm {
|
||||
public function validateFrequency(string $attribute): void {
|
||||
if (!$this->hasErrors()) {
|
||||
$emailConfirmation = $this->getEmailActivation();
|
||||
if ($emailConfirmation !== null && !$emailConfirmation->canRepeat()) {
|
||||
if ($emailConfirmation !== null && !$emailConfirmation->canResend()) {
|
||||
$this->addError($attribute, E::RECENTLY_SENT_MESSAGE);
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ class ForgotPasswordForm extends ApiForm {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getEmailActivation(): ?EmailActivation {
|
||||
public function getEmailActivation(): ?ForgotPassword {
|
||||
$account = $this->getAccount();
|
||||
if ($account === null) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user