We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    How does the login/register/confirmation snippet[s] notify a user that their registration link has expired??

    All it does now is "nothing" is there an option in the confirmation snippet to redirect them to another resource? [I don't see one!]

    -thanks
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 3749
      • 24,544 Posts
      http://rtfm.modx.com/extras/revo/login/login.confirmregister

      &errorPage -- Optional. If set, will redirect user to a custom error page if they try to access this page after activating their account.

      They will also be redirected there if the registration ttl has expired.
        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
        • 26503
        • 620 Posts
        Yes - I had tried that initially - when it didn't work I assumed it was for "other errors"

        what I have in my confirm register page is: [[!ConfirmRegister? &errorPage=`58`]]

        I can pull up the registration-error [58] page normally, but if I try to use an expired link. It just defaults to the home page.

        -sean



        Quote from: BobRay at Feb 19, 2015, 11:05 AM
        http://rtfm.modx.com/extras/revo/login/login.confirmregister

        &errorPage -- Optional. If set, will redirect user to a custom error page if they try to access this page after activating their account.

        They will also be redirected there if the registration ttl has expired.
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 26503
          • 620 Posts
          Got curious and did some testing ... it looks like the format of the link is causing it...

          the link in the email is:

          http://dev.globalstainlessauctions.com/confirm-register/?lp=cnlnczAzY3Q%253D&lu=c3VzYW5rcmFtZWs%253D

          clicking on that won't trigger the confirm-register, if I change the link a littleL:

          http://dev.globalstainlessauctions.com/confirm-register/?lp=cnlnczAzY3Q%253D&lu=c3VzYW5rcmFtZWswef

          THEN I get the confirmation failure page as expected....

          What is up with that?
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
            • 3749
            • 24,544 Posts
            Good question. Looking at the confirmRegister controller code, it appears that if there are no users with active records in the registry, it just sends the user to the error page. If there are records and none relate to the current user, the &errorPage property comes into play.

            None of that makes sense to me, but it looks like that's how it works:

             
                    $this->modx->getService('registry', 'registry.modRegistry');
                    $this->modx->registry->addRegister('login','registry.modFileRegister');
                    $this->modx->registry->login->connect();
                    $this->modx->registry->login->subscribe('/useractivation/'.$this->user->get('username'));
                    $msgs = $this->modx->registry->login->read();
                    if (empty($msgs)) $this->modx->sendErrorPage();
                    $found = false;
                    foreach ($msgs as $msg) {
                        if ($msg == $this->password) {
                            $found = true;
                        }
                    }
                    if (!$found) {
                        $this->redirectAfterFailure();
                    }


            I use Subscribe to do registration. I'm not sure how it behaves in this condition either.
              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