2016-05-10 22:40:06 +03:00
|
|
|
<?php
|
2019-12-13 22:27:13 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2016-05-10 22:40:06 +03:00
|
|
|
namespace common\models\confirmations;
|
|
|
|
|
|
|
|
use common\models\EmailActivation;
|
2019-12-13 22:27:13 +03:00
|
|
|
use common\models\EmailActivationQuery;
|
2019-12-21 01:23:58 +03:00
|
|
|
use DateInterval;
|
2016-05-10 22:40:06 +03:00
|
|
|
|
2016-05-10 23:28:04 +03:00
|
|
|
class ForgotPassword extends EmailActivation {
|
2016-05-10 22:40:06 +03:00
|
|
|
|
2019-12-13 22:27:13 +03:00
|
|
|
public static function find(): EmailActivationQuery {
|
|
|
|
return parent::find()->withType(EmailActivation::TYPE_FORGOT_PASSWORD_KEY);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function init(): void {
|
2016-05-10 22:40:06 +03:00
|
|
|
parent::init();
|
|
|
|
$this->type = EmailActivation::TYPE_FORGOT_PASSWORD_KEY;
|
|
|
|
}
|
|
|
|
|
2019-12-21 01:23:58 +03:00
|
|
|
protected function getResendTimeout(): ?DateInterval {
|
|
|
|
return new DateInterval('PT30M');
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getExpireDuration(): ?DateInterval {
|
|
|
|
return new DateInterval('PT1H');
|
|
|
|
}
|
|
|
|
|
2016-05-10 22:40:06 +03:00
|
|
|
}
|