1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User Online in model... ?

Discussion in 'XenForo Development Discussions' started by Zephyr, Nov 28, 2012.

  1. Zephyr

    Zephyr Well-Known Member

    Hello, I am looking the model with which I can retrieve the number of members and visitors currently online but can not find, do you know where it is please? :)
     
  2. James

    James Well-Known Member

    XenForo_Model_Session function getSessionActivityRecords($a, $b)
     
    Zephyr likes this.
  3. Zephyr

    Zephyr Well-Known Member

    Thanks :)
    I can retrieve the list of users online on my website, but how add the people who visit my site in the stats please ?

    My code :
    PHP:
    <?php
     
    namespace Kyna\AccueilBundle\Controller;
     
    use 
    Symfony\Bundle\FrameworkBundle\Controller\Controller;
     
    class 
    AccueilController extends Controller
    {
        public function 
    indexAction()
        {
            
    // Xenforo integration
            
    $this->container->get('kyna_xenforo.xenforointegration');
            
    $sessionModel = \XenForo_Model::create('XenForo_Model_Session');
            
    $userOnline $sessionModel->getSessionActivityRecords(array());
     
            
    var_dump($userOnline);
     
            return 
    $this->render('KynaAccueilBundle:Accueil:Layout.html.twig');
        }
    }
     

Share This Page