We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21778
    • 223 Posts
    Hi,

    I’m trying to get a SMF forum login/logout to display on my modx site. I have SMF installed in root/SMF/

    So far i have this:
    <?php
    require ($modx->config['base_path'] . "SMF/SSI.php");
    
    if ($context['user']['is_guest'])
    {
       ssi_login();
    }
    else
    {
       //You can show other stuff here.  Like ssi_welcome().  That will show a welcome message like.
       //Hey, username, you have 552 messages, 0 are new.
       ssi_logout();
    }
    ?>


    This shows the login form, and it also work: upon providing username/password and pressing “login” then user is redirected to the forum front-page and is automatically logged in. But now when I navigate back to my modxsite, there is no “log out” choice only the same login form. Am I missing something?

    Thanks (:
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Is the snippet you’re using uncached?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.