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

    If I try to access a protected page by writing its complete URL I get the WebLogin form correctly, but after a successfully login I want to get to the page i called and not to some pre-choosen page. I had this functionallity before upgrade to 0.9.5 and I can’t figure out why i can’t get it now. Any clues?
      • 7923
      • 4,213 Posts
      Look at the snippet parameter documentation from the head of the snippet. Remove loginhomeid parameter from the snippet call.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17863
        • 32 Posts
        Hello,

        I have the same problem on my 0.9.5.
        I don’t use homeid but WebLogin don’t redirect me.

        help !
          --
          MacSpyre
          • 7923
          • 4,213 Posts
          what’s your snippet call


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 17863
            • 32 Posts
            [[WebLogin? &logouthomeid=`1` &logouttext=`Quitter l’espace adhérent` &tpl=`tplLogin` ]]

            PS : I use friendly url
              --
              MacSpyre
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              try calling it uncached: [!WebLogin?... !]
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 7455
                • 2,204 Posts
                &logouthomeid=`1` should be &loginhomeid=`1`

                &logouthomeid=`1` is for when you logout
                  follow me on twitter: @dimmy01
                  • 17863
                  • 32 Posts
                  If I use the loginhomeid, the redirection by the url can’t works.

                  I see in the snippet :

                  # Params:
                  # &loginhomeid - (Optional)
                  # redirects the user to first authorized page in the list.
                  # If no id was specified then the login home page id or
                  # the current document id will be used

                  So, I don’t specified the loginhomeid, and I remove the cache function by call the snippet with [! ... !].

                  By a example :
                  a website make a link to a private page on my website.
                  The url is on the urlbar of my browser, but I’m on the login page.
                  When I submit the form with the login & password, the url in my browser disappear, and there no redirection to this link.

                  How I must do ?

                  Thanks
                    --
                    MacSpyre
                    • 7455
                    • 2,204 Posts
                    do you want to stay on the home page? ore did you set a homepage for the webuser in his settings in modx? ore dou you want to redirect to id 1?

                    how can a external page link to a protected page? that will never work unless you are logged in.
                    so this never works. or you need to have the external page send a parameter in the url that you can then grab and place it in the snippetcall like this:

                    www.thenameofyoursite.tld/pahename.html?page=`idnumberfromthatpage`

                    then make a small snippet called get and place this in the snippet:

                    <?php
                    $output = $_GET['page'];
                    return $output;
                    ?>
                    


                    and call your login like this:

                    [[WebLogin? &logouthomeid=`1` &loginhomeid=`[[get]]` &logouttext=`Quitter l’espace adhérent` &tpl=`tplLogin` ]]

                    that should work I think
                      follow me on twitter: @dimmy01
                      • 17863
                      • 32 Posts
                      That is Dimmy.
                      This this for a link to a protected page when the user is not logged.

                      I make the snippet get, and I call it in the parameters of the weblogin, but that not work.
                      At bottom of the login form, I can see the end of the snippet call :
                      ` &logouttext=`Quitter l'espace adhérent` &tpl=`tplLogin` ]]


                      Thanks for your help
                        --
                        MacSpyre