Skip to content

Commit

Permalink
Автоавторизация после оформления заказа
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Sep 6, 2024
1 parent 41c56cb commit 0614114
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();*/
Expand Down

0 comments on commit 0614114

Please sign in to comment.