frontend/controllers/UserController.php
/**
     * Display log for devices
     * @return mixed
     */
Display log for devices
@return mixed
Display log for devices @return mixed
public function actionDevicesLog()
    {
        if (isset($_GET['node_id'])) {
            $_GET['node_id'] = intval($_GET['node_id']);
            $UserNode = UserNode::findOne([
                'user_id' => $this->User->user_id,
                'node_id' => $_GET['node_id'],
            ]);
            if ($UserNode) {
                $SessionsSearch  = new SessionsSearch();
                $dataProvider = $SessionsSearch->search2([
                    'user_id' => $this->User->user_id,
                    'node_id' => $_GET['node_id'],
                ], 5);
                return $this->renderPartial('devices_list_item_manage_node', [
                    'User' => $this->User,
                    'SessionsSearch' => $SessionsSearch,
                    'dataProvider' => $dataProvider,
                    'UserNode' => $UserNode,
                ]);
            } else {
                return "Error: User access error. Not exist node with this node_id for user";
            }
        } else {
            return "Error";
        }
    }
public function actionDevicesLog ( ) { if ( isset ( $ _GET [ 'node_id' ] ) ) { $ _GET [ 'node_id' ] = intval ( $ _GET [ 'node_id' ] ) ; $ UserNode = UserNode :: findOne ( [ 'user_id' => $ this -> User -> user_id , 'node_id' => $ _GET [ 'node_id' ] , ] ) ; if ( $ UserNode ) { $ SessionsSearch = new SessionsSearch ( ) ; $ dataProvider = $ SessionsSearch -> search2 ( [ 'user_id' => $ this -> User -> user_id , 'node_id' => $ _GET [ 'node_id' ] , ] , 5 ) ; return $ this -> renderPartial ( 'devices_list_item_manage_node' , [ 'User' => $ this -> User , 'SessionsSearch' => $ SessionsSearch , 'dataProvider' => $ dataProvider , 'UserNode' => $ UserNode , ] ) ; } else { return " Error: User access error. Not exist node with this node_id for user " ; } } else { return " Error " ; } }
Display log for devices
 @return mixed
Display log for devices @return mixed