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