We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28626
    • 87 Posts
    If I use the defaults and I want register to redirect using the submittedResourceId I get this:

    http://elearning.onebuttonapps.net/index.php?id=5?username=XXXX&[email protected]


    so 2 question marks causing it to redirect to the first page instead of the page with id=5.

      • 28626
      • 87 Posts
      It seems to me the only thing that should happen is a replacement of that second ? into a &
        • 28215
        • 4,149 Posts
        Sounds like a bug. Can you file that here: http://github.com/splittingred/Login/issues/
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 8584
          • 14 Posts
          I modified it earlier when I thought it was an issue using an uauth snippet

          I created a quick fix in processors/register.php
          line 154 ish

          /* if provided a redirect id, will redirect to that resource, with the
           * GET params `username` and `email` for you to use */
          $submittedResourceId = $modx->getOption('submittedResourceId',$scriptProperties,'');
          if (!empty($submittedResourceId)) {
              $seperator = '?';
              $urlpart = $modx->makeUrl($submittedResourceId);
              $pos = strpos($urlpart,'?');
              if($pos){
                 $seperator = '&';
              }
              $url = $urlpart.$seperator.'username='.$user->get('username').'&email='.$profile->get('email');
              $modx->sendRedirect($url);
          } else {
          
            • 28626
            • 87 Posts
            thanks