Commit ce8b3fb6 authored by Shakarim Sapa's avatar Shakarim Sapa

- Фикс обращений к записям в сессии

parent c0c3be38
...@@ -4,7 +4,7 @@ use yii\helpers\Html; ...@@ -4,7 +4,7 @@ use yii\helpers\Html;
use \common\modules\blog\models\BlogBids; use \common\modules\blog\models\BlogBids;
$userIsSubscribed = false; $userIsSubscribed = false;
$cacheEmail = Yii::$app->cache->get('user_email'); $cacheEmail = Yii::$app->session->get('user_email');
if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->exists()===true) if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->exists()===true)
$userIsSubscribed = true; $userIsSubscribed = true;
?> ?>
......
...@@ -8,7 +8,7 @@ use common\modules\content\models\CoContent; ...@@ -8,7 +8,7 @@ use common\modules\content\models\CoContent;
use common\modules\cases\models\CasesBids; use common\modules\cases\models\CasesBids;
$userIsSubscribed = false; $userIsSubscribed = false;
$cacheEmail = Yii::$app->cache->get('user_email'); $cacheEmail = Yii::$app->session->get('user_email');
if ($cacheEmail!==false && CasesBids::find()->where(['email' => $cacheEmail])->exists()===true) if ($cacheEmail!==false && CasesBids::find()->where(['email' => $cacheEmail])->exists()===true)
$userIsSubscribed = true; $userIsSubscribed = true;
......
...@@ -4,7 +4,7 @@ use yii\helpers\Html; ...@@ -4,7 +4,7 @@ use yii\helpers\Html;
use common\modules\cases\models\CasesBids; use common\modules\cases\models\CasesBids;
$userIsSubscribed = false; $userIsSubscribed = false;
$cacheEmail = Yii::$app->cache->get('user_email'); $cacheEmail = Yii::$app->session->get('user_email');
if ($cacheEmail!==false && CasesBids::find()->where(['email' => $cacheEmail])->exists()===true) if ($cacheEmail!==false && CasesBids::find()->where(['email' => $cacheEmail])->exists()===true)
$userIsSubscribed = true; $userIsSubscribed = 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