public function actionList()
    {
        if (!Yii::$app->user->isGuest) {
            $searchModel = new SearchViewedProduct();
            $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

            return $this->render('list', [
                'searchModel' => $searchModel,
                'dataProvider' => $dataProvider,
            ]);
        } else throw new NotFoundHttpException();
    }
public function actionList()
    {
        if (!Yii::$app->user->isGuest) {
            $searchModel = new SearchViewedProduct();
            $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

            return $this->render('list', [
                'searchModel' => $searchModel,
                'dataProvider' => $dataProvider,
            ]);
        } else throw new NotFoundHttpException();
    }
public function actionList ( ) { if ( ! Yii :: $ app -> user -> isGuest ) { $ searchModel = new SearchViewedProduct ( ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; return $ this -> render ( 'list' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , ] ) ; } else throw new NotFoundHttpException ( ) ; }
Shows list of all user viewed products.

@return mixed
@throws NotFoundHttpException
Shows list of all user viewed products .