From 061411475284dc9b2de12c96485ffc15c1c9f0a4 Mon Sep 17 00:00:00 2001 From: Semenov Date: Fri, 6 Sep 2024 10:47:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B2=D1=82=D0=BE=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B5=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CartController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/CartController.php b/src/controllers/CartController.php index e7a5c0a..1d010ce 100644 --- a/src/controllers/CartController.php +++ b/src/controllers/CartController.php @@ -231,6 +231,10 @@ public function actionOrderCheckout() $t->commit(); + if (\Yii::$app->user->isGuest) { + //Автоматически авторизовать пользователя + \Yii::$app->user->login($order->cmsUser, 3600 * 24 * 365 * 5); + } /*$order->shopCart->shop_order_id = null; $order->shopCart->save();*/