We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30765
    • 66 Posts
    Hello! I’m new to MODx and finding it very rewarding. But I have a small issue with the WebSignup snippet that someone might be able to help me with.

    I have some pages that require authorisation, so when someone tries to visit one they are redirected to my nominated signup page. That page has two forms: one for new users and one for returning, already-registered users. The page uses, as you’d expect, WebLogin and WebSignup.

    WebLogin is working great, once I made the change noted here

    http://modxcms.com/forums/index.php/topic,16528.msg105658.html#msg105658

    so that the user is directed to the original page once logged in.

    However, WebSignup doesn’t redirect to the original page and it doesn’t actually log the user in. Once a new user has filled out the registration form, I would like them to be automatically logged in and sent on their way to the page they originally requested.

    I can see how WebLogin does its magic to send them to the original document and I’m sure I could hack at the WebSignup snippet to do the same, but obviously that won’t be much help unless they are already logged-in. Is it possible to automatically log in new users when they register?

    Hope this makes sense!

    Thanks
    Matt

      • 26104
      • 36 Posts
      A very simple solution could be;
      Add the username and password used in the SignUp snippet and POST them to the page where the weblogin-form is pointing to. Only problem could be redirecting the user to the correct page, but mayb you can hack this a little by putting the redirect page into a session variable.
        • 4775
        • 47 Posts
        has anyone actually implemented this, or tried?