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

    I have created all necessary Pages, Forms, Resources Groups, User Roles, Users etc.
    If I Login in the Frontend with a valid user, there is always shown that I'm logged in as (anonymous).

    Login Package is installed.

    How can I get it to work?

    Thank you very much for your help!

    This question has been answered by seliin. See the first response.

      • 38783
      • 571 Posts
      Assuming that everything is set up correctly (congratulations if it is!)...

      From the Manager
      Manage/Flush your permissions
      Manage/Logout all users

      Make sure that when you are logging in to the Front End you are not also logged in to the Manager in the same web browser.
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 26610
        • 25 Posts
        I've done that appr. 1000 times.. sad
        I can't login...
          • 38783
          • 571 Posts
          Could you post your code? - I know there will be quite a lot of pieces of code to post :-(

          I presume there are no clues in the MODX Error log?

          Are you using MODX 2.6.5 and Login 1.9.5?

          Do you have multiple contexts?
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 26610
            • 25 Posts
            Login Snippet:

            [[!Login?
            &loginResourceId=`329`
            &logoutResourceId=`329`
            &contexts=`de`
            ]]

            No, there are no clues in the MODx Error Log

            Yes, I am using these versions (MODX 2.6.5 and Login 1.9.5)

            Yes, I have multiple contexts: web, de, en

            The Frontend user should only be able to Login to the "de" Context.

            I have setup many other Websites, where everything works... but not here, I just can't figure out why..
              • 3749
              • 24,544 Posts
              Is the user already in the de context when logging in (IOW, has that context been initialized by default, or initialized with $modx->switchContext)? If the user gets switched to another context as part of the login process, the session variables containing the entered username and password may be lost, making the user anonymous.

              Also, make sure that user is in a User Group that has a Context Access ACL entry for the 'de' context with a role other than member.

              As a diagnostic, try listing all front-end contexts in the login tag:


              &contexts=`de,en`
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 26610
                • 25 Posts
                Yes, the user is in the 'de' context when logging in.

                The context has been initialized with $modx->switchContext('de');

                The user is in a User Gruop that has Context Access ACL for the 'de' Context. Role Name: Extranet Member

                I also tried listing all front-end contexts in the login tag. no success
                  • 3749
                  • 24,544 Posts
                  Maybe you've already done this, but if not:

                  Put this tag on the Login page and any post-login landing page:

                  <p>CONTEXT: [[!GetContext]]</p>


                  Then create a snippet called GetContext with this code:

                  return $modx->context->get('key');


                  BTW, make sure you're previewing from the Manager, and make sure you're not logged in to the Manager when you test. That confuses you're front-end login status.

                  I usually test in another browser (a separate window is not enough), where I'm not logged in to the Manager.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 26610
                    • 25 Posts
                    I've put this tag on the Login page and landing page.
                    Both times it shows: CONTEXT: de

                    Also in another Browser, incognito window etc. (not logged in to the Manager)
                    It doesn't work...
                      • 38783
                      • 571 Posts
                      Is this site on the same hosting / server configuration as the other sites where you have this working OK?
                        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                        email: [email protected] | website: https://andytough.com