mirror of
https://github.com/elyby/accounts.git
synced 2026-05-02 20:24:07 +05:30
Rework email_activation model, get rid of behaviors, use json column to store additional data
This commit is contained in:
@@ -50,7 +50,7 @@ class RepeatAccountActivationForm extends ApiForm {
|
||||
public function validateExistsActivation(string $attribute): void {
|
||||
if (!$this->hasErrors()) {
|
||||
$activation = $this->getActivation();
|
||||
if ($activation !== null && !$activation->canRepeat()) {
|
||||
if ($activation !== null && !$activation->canResend()) {
|
||||
$this->addError($attribute, E::RECENTLY_SENT_MESSAGE);
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class RepeatAccountActivationForm extends ApiForm {
|
||||
->one();
|
||||
}
|
||||
|
||||
public function getActivation(): ?EmailActivation {
|
||||
public function getActivation(): ?RegistrationConfirmation {
|
||||
return $this->getAccount()
|
||||
->getEmailActivations()
|
||||
->withType(EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION)
|
||||
|
||||
Reference in New Issue
Block a user