XF 2.0 Error while recovering (SessionActivity)

XenConcept

Well-known member
Je travail sur un widget.

I want to retrieve the data from the table "xf_session_activity". J'ai réussis à le faire.

My problem is when I get the data it shows me that I'm in the Controller Forum but I'm in the controller Thread.

error.webp

Widget code :

PHP:
$finder = \XF::finder('XF:SessionActivity');
       
        \XF::dump($finder->fetch());

And when I update the page it works.
 
I find a solution

PHP:
\XF::em()->clearEntityCache('XF:SessionActivity');

/** @var \XF\Finder\SessionActivity $finder */
$finder = \XF::finder('XF:SessionActivity');

\XF::dump($finder->fetch());
 
Back
Top Bottom