We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    I’m getting a weird issue with the ForgotPassword functionality of the login package...

    I’m using an exact copy of the default forgot password form, if someone enters a user name OR email address that is not in the system I get an error thrown:

    Fatal error: Call to a member function toArray() on a non-object in /var/www/vhosts/oncologyeducation.ca/subdomains/modx/httpdocs/core/cache/elements/modsnippet/9.include.cache.php on line 89
    


    If the person enters a correct user name & no email, no mail is sent
    If a person enters a correct email & no username, the reset password mail is sent [and the password is reset]

    There are no errors in the modx logs, no real hint as to what is happening, and nothing has been customized much. [I’m pretty sure, but not 100% that it was working]

    here is the forgot password resource:
    [[!ForgotPassword? &resetResourceId=`214` &tplType=`modChunk` &tpl=`lgnCustomForgotPassTpl`]]


    the reset resource is [214]:
    [[!ResetPassword? &loginResourceId=`215` &tplType=`modChunk` &tpl=`lgnCustomResetPassTpl`]]


    the lgnCustomForgotPassTpl:
    <form class="loginFPForm" action="[[~[[*id]]]]" method="post">
    	<ul class="login-form forgot-password">
    	<li class="login-errors"><label> </label>[[+loginfp.errors]]</li>
    	<li>
    		<label>User Name</label>
    		<input class="loginFPUsername" type="text" name="username" value="[[+loginfp.post.username]]" />
    	</li>
    	<li class="instruction">[[%login.or_forgot_username]]</li>
    	<li>
    		<label>Email Address</label>
    		<input class="loginFPEmail" type="text" name="email" value="[[+loginfp.post.email]]" />
    	</li>
    	<li>
    		<input class="returnUrl" type="hidden" name="returnUrl" value="[[+loginfp.request_uri]]" />
    		<input class="loginFPService" type="hidden" name="login_fp_service" value="forgotpassword" />
    		<label> </label>
    		<input type="submit" name="login_fp" value="[[%login.reset_password]]" class="reset-password" />
    	</li>
    	</ul>
    </form>



    -anyone seen this before??

    -thanks
    -sean



      *** 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
      here is something not very fun at all....

      If I change a password in the admin, the password is stored in the database encrypted....
      If the user gets through the change password request... the password is stored in plain text!! uh-oh!

      How do I fix that?

      -sean
        *** 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
        I reported both of these issues as bugs, not even 12 hours later the tickets were updated & fixes scheduled for next release.

        Isn’t modx great?!

        -sean
          *** 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