瀏覽代碼

[Backend] Distribution > user : correctif point sale favorite

feature/souke
Guillaume Bourgeois 1 年之前
父節點
當前提交
401d49256b
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. +7
    -3
      backend/controllers/DistributionController.php

+ 7
- 3
backend/controllers/DistributionController.php 查看文件

@@ -457,11 +457,15 @@ class DistributionController extends BackendController
{
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
$userManager = $this->getUserManager();
$user = $userManager->findOneUserById($idUser);
$favoritePointSale = $userManager->getUserFavoritePointSale($user);
$idFavoritePointSale = 0;
if ($favoritePointSale) {
$idFavoritePointSale = $favoritePointSale->id;

if($user) {
$favoritePointSale = $userManager->getUserFavoritePointSale($user);
if ($favoritePointSale) {
$idFavoritePointSale = $favoritePointSale->id;
}
}

return [

Loading…
取消
儲存