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

Get $visitor logged in

Discussion in 'XenForo Development Discussions' started by Ajaxboy, Feb 16, 2011.

  1. Ajaxboy

    Ajaxboy Active Member

    What am I missing?. I am logged in.. but when It comes down to this part, it thinks I am a guest, not a logged in user..

    What am I missing?.

    ps: this is an independent file

            //Initializing XenForo
    $startTime microtime(true);
    $xenforoRoot str_replace("\\","/", (dirname(dirname(dirname(dirname(__FILE__))))));
    $roorDir $xenforoRoot;

    // Setup XenForo's autoloader
    require_once($xenforoRoot '/library/XenForo/Autoloader.php');
    XenForo_Autoloader::getInstance()->setupAutoloader($xenforoRoot '/library');

    XenForo_Application::initialize($xenforoRoot '/library'$roorDir);

    $visitor XenForo_Visitor::getInstance()->toArray();

    $visitor['user_id']) {

    "user_id: {$visitor['user_id']}");
            } else {

  2. Ajaxboy

    Ajaxboy Active Member

    Any Ideas? why it is not recognizing the session
  3. James

    James Well-Known Member

  4. Ajaxboy

    Ajaxboy Active Member

    Thx bud... this made the trick..

    James likes this.
  5. Ajaxboy

    Ajaxboy Active Member

    is there any chance this code would trigger a "security error"?

Share This Page