- Добавлена логика проверки регистрации

- Возвращено свойство recall
parent ffee3bf4
......@@ -5,12 +5,15 @@ namespace common\modules\triggers\components\conditions\conditions;
use common\components\UnisenderAPI;
use common\modules\triggers\components\conditions\vendor\ConditionBase;
use common\modules\triggers\components\conditions\vendor\ConditionInterface;
use common\modules\users\models\User;
class CheckUserToRegistration extends ConditionBase implements ConditionInterface{
const CONDITION_ID = 6;
public $name = 'Пользователь зарегистрировался (Игнорируется оператором "И")';
public $recall=false;
/**
* @param null|string $conditionName
* @return $this mixed
......@@ -24,6 +27,7 @@ class CheckUserToRegistration extends ConditionBase implements ConditionInterfac
* @return bool
*/
public function check($message){
return true;
$exists = User::find()->where(['email' => $message->email])->exists();
return $exists;
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment