We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10896
    • 76 Posts
    I have a snippet to display a user’s login homepage. It’s just a link in the upper corner to route to their login homepage. To do this I test first if there is a value for this session variable

    $_SESSION[’webUsrConfigSet’][’login_home’]

    if not then I test for $_COOKIE[’WebLoginPE’] and use the cookie data to extract the user’s login homepage from a db query.

    This displays the user home link properly when I return to the site. However, if I am logged in and leave the site and then return, when I click on the link I get taken to the webloginPE snippet page where I get a confirmation message saying... "welcome back." Following this the user home link works perfectly until I leave the site and return.

    Is there a way to avoid this intermediate step when returning to the site as still logged in? I just want it to successfully route to the user’s home page as long as the login cookie is set.

    Thanks.
      • 28033
      • 925 Posts
      I dunno how I did it, but it doesn’t do that for me.
        My Snippets
        -> PopUpChunk v1.0
        • 10896
        • 76 Posts
        FWIW, I’ve tried using the API in this simple snippet:

        include_once $_SERVER['DOCUMENT_ROOT'] . '/assets/snippets/webloginpe/webloginpe.class.php';
        include_once $_SERVER['DOCUMENT_ROOT'] . '/assets/snippets/webloginpe/lang/en.php';
        
        $wlpe = new WebLoginPE($wlpe_lang);
        $wlpe->AutoLogin();
        


        And this usually ends up with a browser spinning and not loading. Then I get errors. Usually MODx time out errors.