We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8425
    • 159 Posts
    Hi,
    I’d like to use 2 other templates; one if the Activation is successful and another one if the Reset email is successful. For now upon successful activation, one is redirected to the main login template. Ditto for Reset. I’d like something similar to the parameter $registerSuccessTpl but for Reset and Activate.
    Has anyone done something similar?

    Here is the snippet I use:

    [!WebLoginPE? &lang=`en` &type=`simple` &regType=`verify` &loHomeId=`3` &liHomeId=`4,5` &pruneDays=`14` &loginFormTpl=`FormLoginPE`  &registerTpl=`Register`  &successTpl=`LoginSuccessfull` &regRequired=`email,username,firstName,lastName` &registerSuccessTpl=`RegisterSuccessfull`  &resetTpl=`ResetPwd` &groups=`Registered Users` &profileDeleteTpl=`DeleteProfile` &activateTpl=`Activate` &profileTpl=`Profile` &notify=`[(emailsender)]` &notifyTpl=`Notify`  !]


    Thank you
      • 8425
      • 159 Posts
      fyi -
      Actually it’s pretty easy to customize. I’ve updated the snippet to allow more successful template parameters.
        • 27442
        • 103 Posts
        Hmmm, perhaps your modifications would be more useful than what I came up with here. http://modxcms.com/forums/index.php/topic,37270.msg225880.html#msg225880

        Care to share what you did?
          • 8425
          • 159 Posts
          That’s pretty simple.
          I’ve changed the snippet webloginpe for the "reset" case as below. I’ve added a parameter to handle the template "displayResetSuccessTpl" and I return "true" in the webloginpe.class.php for the ResetPassword function if successful.

          case 'reset' :
          				if (in_array('resetpassword', $disableServices)){return;}
          				if ( $wlpe->ResetPassword() )
                                          {
                                             return $displayResetSuccessTpl; // Added simplyfied reset success dialog
                                          }
          				if (isset($wlpe->Report)) 
          				{                                        
                                                  if (isset($_POST['email']))
          					{
          						return $displayResetTpl;
          					}
                                                  else
                                                  {
                                                     return $displayActivateTpl;
                                                  }
          				}
          				return;