mirror of
https://github.com/elyby/accounts.git
synced 2025-01-14 16:02:21 +05:30
Интегрирован сбор метрик в действия с аккаунтом
This commit is contained in:
parent
6ee40f3fcc
commit
a94e7095c8
@ -1,11 +1,15 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use yii\base\ErrorException;
|
||||
use const \common\LATEST_RULES_VERSION;
|
||||
|
||||
class AcceptRulesForm extends AccountActionForm {
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.acceptRules")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
$account = $this->getAccount();
|
||||
$account->rules_agreement_version = LATEST_RULES_VERSION;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\validators\EmailActivationKeyValidator;
|
||||
use common\helpers\Amqp;
|
||||
use common\models\amqp\EmailChanged;
|
||||
@ -19,6 +20,9 @@ class ChangeEmailForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.changeEmail")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use common\validators\LanguageValidator;
|
||||
|
||||
@ -15,6 +16,9 @@ class ChangeLanguageForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.switchLanguage")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\components\User\Component;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use api\validators\PasswordRequiredValidator;
|
||||
@ -43,6 +44,9 @@ class ChangePasswordForm extends AccountActionForm {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.changePassword")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use api\validators\PasswordRequiredValidator;
|
||||
use common\helpers\Amqp;
|
||||
@ -26,6 +27,9 @@ class ChangeUsernameForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.changeUsername")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use api\validators\PasswordRequiredValidator;
|
||||
use api\validators\TotpValidator;
|
||||
@ -21,6 +22,9 @@ class DisableTwoFactorAuthForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.disableTwoFactorAuth")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\components\User\Component;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use api\validators\PasswordRequiredValidator;
|
||||
@ -23,6 +24,9 @@ class EnableTwoFactorAuthForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.enableTwoFactorAuth")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use common\emails\EmailHelper;
|
||||
use api\validators\PasswordRequiredValidator;
|
||||
@ -34,6 +35,9 @@ class SendEmailVerificationForm extends AccountActionForm {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.sendEmailVerification")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace api\modules\accounts\models;
|
||||
|
||||
use api\aop\annotations\CollectModelMetrics;
|
||||
use api\exceptions\ThisShouldNotHappenException;
|
||||
use common\emails\EmailHelper;
|
||||
use api\validators\EmailActivationKeyValidator;
|
||||
@ -22,6 +23,9 @@ class SendNewEmailVerificationForm extends AccountActionForm {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @CollectModelMetrics(prefix="accounts.sendNewEmailVerification")
|
||||
*/
|
||||
public function performAction(): bool {
|
||||
if (!$this->validate()) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user