2016-05-16 04:03:19 +05:30
|
|
|
<?php
|
2019-12-14 00:57:13 +05:30
|
|
|
declare(strict_types=1);
|
|
|
|
|
2016-05-16 04:03:19 +05:30
|
|
|
namespace common\models\confirmations;
|
|
|
|
|
|
|
|
use common\models\EmailActivation;
|
2019-12-14 00:57:13 +05:30
|
|
|
use common\models\EmailActivationQuery;
|
2016-05-16 04:03:19 +05:30
|
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
|
|
|
|
class CurrentEmailConfirmation extends EmailActivation {
|
|
|
|
|
2019-12-14 00:57:13 +05:30
|
|
|
public static function find(): EmailActivationQuery {
|
|
|
|
return parent::find()->withType(EmailActivation::TYPE_CURRENT_EMAIL_CONFIRMATION);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function behaviors(): array {
|
2016-05-16 04:03:19 +05:30
|
|
|
return ArrayHelper::merge(parent::behaviors(), [
|
|
|
|
'expirationBehavior' => [
|
2016-07-17 23:16:04 +05:30
|
|
|
'repeatTimeout' => 6 * 60 * 60, // 6h
|
|
|
|
'expirationTimeout' => 1 * 60 * 60, // 1h
|
2016-05-16 04:03:19 +05:30
|
|
|
],
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2019-12-14 00:57:13 +05:30
|
|
|
public function init(): void {
|
2016-05-16 04:03:19 +05:30
|
|
|
parent::init();
|
|
|
|
$this->type = EmailActivation::TYPE_CURRENT_EMAIL_CONFIRMATION;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|