- Добавлены комментарии к afterSubscribe

parent 07c913b9
......@@ -646,9 +646,11 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
if ($exists===true && $count==1) {
$init = $trigger->initAction($params);
if ($init===true) {
// Указываем дату следующей отправки (по умолчанию сегодня, в момент срабатывания триггера)
$user=User::findOne($this->id);
$user->delivery_date = $date->format('Y-m-d');
$user->save(false);
// Вызываем перезапуск всех триггеров
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, Yii::$app->urlManager->createAbsoluteUrl('/triggers/default/rechecktriggers'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
......@@ -656,6 +658,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
$this->addError('email', curl_error($curl));
return false;
}
// Затем инициируем рассылку
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, Yii::$app->urlManager->createAbsoluteUrl('/triggers/default/recheckcases'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
......
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