We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38740
    • 45 Posts
    Hi,
    trying to use login for frontend access.

    I have a startpage with link to a login page.
    The loginpage shows the login-form and redirects on successful login to the protected page.
    It works on first visit.
    But if the user is already logged in and comes back to login-form, he is not redirected to the protected page automatically as i had expected, login just shows a logout-link.

    How to solve this the best way?

    :-)
      ____________________________________________________
      • 38740
      • 45 Posts
      Trying to use this code (to check if user is logged in) in a snippet but it doesnt return anything:

      return $modx->userLoggedIn();


      Any suggestions?
        ____________________________________________________
        • 38740
        • 45 Posts
        The problem persists...

        I have a login page that redirects to a controlpanel-page, works great with Login to log into the frontend.

        PROBLEM: When i return to the loginpage days after last visit i get the "logout" button instead of the login-form. If i press logout i get the form and can login without problems.

        QUESTION: Why do login show logout when i return days later?

        :-|
          ____________________________________________________