shish 6 éve
szülő
commit
e04e365eb2
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      common/components/business.php

+ 4 - 3
common/components/business.php

@@ -133,12 +133,13 @@ class business
 	public static function formatUserAvatar($info)
 	{
 		$imgUrl = isset($info['avatar']) ? $info['avatar'] : '';
+		$prefixImgUrl = Yii::$app->params['imgHost'];
 		if (empty($imgUrl)) {
-			$info['avatarUrl'] = '';
-			$info['smallAvatarUrl'] = '';
+			$defaultImg = $prefixImgUrl . '/retail/default-img.png';
+			$info['avatarUrl'] = $defaultImg;
+			$info['smallAvatarUrl'] = $defaultImg;
 			return $info;
 		}
-		$prefixImgUrl = Yii::$app->params['imgHost'];
 		$smallImg = self::getSmallImg($imgUrl);
 		$small = $prefixImgUrl . $smallImg;
 		$info['smallAvatarUrl'] = $small;