Commit 23d12c66 authored by Shakarim Sapa's avatar Shakarim Sapa

- Fix

parent 69fa89cb
...@@ -29,7 +29,6 @@ class BlogBidController extends BaseController { ...@@ -29,7 +29,6 @@ class BlogBidController extends BaseController {
$date = new \DateTime(); $date = new \DateTime();
$model = new BlogBids(); $model = new BlogBids();
$model->blog = true;
$model->scenario = Yii::$app->request->post('scenario'); $model->scenario = Yii::$app->request->post('scenario');
$model->date = $date->format('Y-m-d H:i:s'); $model->date = $date->format('Y-m-d H:i:s');
if(Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { if(Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
......
...@@ -68,9 +68,6 @@ class BlogBids extends ActiveRecordModel { ...@@ -68,9 +68,6 @@ class BlogBids extends ActiveRecordModel {
/** @var User $user */ /** @var User $user */
$user = User::find()->where(['email' => $this->email])->one(); $user = User::find()->where(['email' => $this->email])->one();
if (!is_null($user)) { if (!is_null($user)) {
if ($this->blog===false)
$user->afterSubscribe(['email' => $this->email], true);
else
$user->afterSubscribeToBlog(['email' => $this->email], true); $user->afterSubscribeToBlog(['email' => $this->email], true);
} }
Yii::$app->cache->set('user_email', $this->email); Yii::$app->cache->set('user_email', $this->email);
......
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