Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Site integration help

edited June 2011 in Vanilla 2.0 - 2.8
Is it possible for some one to show me how to do site integration with PHP


If (!loggedin){
echo "Login";
echo UserId;
echo Username;
echo UserDisplayName;

I want Vanilla to do all the authentication I just need to know how to pull that information. Or at least the userId. and I need this on the server side so I can do some other PHP stuff. Thanks


  • Options
    well this is what I did

    define('APPLICATION', 'Vanilla');
    define('APPLICATION_VERSION', '');
    Copyright 2008, 2009 Vanilla Forums Inc.
    This file is part of Garden.
    Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
    Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along with Garden. If not, see .
    Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com


    // 1. Define the constants we need to get going.
    define('DS', '/');
    define('PATH_ROOT', dirname(__FILE__));

    // 2. Include the header.

    $Session = Gdn::Session();
    $Name = $Session->User->Name;
    $CountNotifications = $Session->User->CountNotifications;

    echo "UserID = " . $Name . " " . $CountNotifications . " " . $Session->UserID;
Sign In or Register to comment.