Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » Security/ChangePassword confirmation message

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1516 Views
  • JonoM
    Avatar
    Community Member
    103 Posts

    Security/ChangePassword confirmation message Link to this post

    I'm struggling a bit with getting password changing to go smoothly.

    It seems to me that I can let members change their password using Security/ChangePassword, but I can't seem to give them feedback to let them know it was changed successfully. There are two problems I think:

    1) Described here: http://silverstripe.org/form-questions/show/277681 in that the form just redirects back to a login page and says 'You're logged in as (member name)' but doesn't let you know the password was changed successfully.

    2) If you revisit Security/ChangePassword as some confused users I think probably would, they see a message 'Your password has been changed, and a copy emailed to you.' but no email has been sent, at least in my case.

    Emails work fine for forgotten passwords for me but not for changing passwords. I don't mind if it doesn't send the user a new password but I don't want it to tell the user it has if it hasn't.

    I found this in Member.php

          if(
             (Director::isLive() || Email::mailer() instanceof TestMailer)
             && $this->isChanged('Password')
             && $this->record['Password']
             && Member::$notify_password_change
          ) {
             $this->sendInfo('changePassword');
          }

    So I'm guessing that 'Member::$notify_password_change' needs to be set to true somehow to send email but I don't know how or where to do that - any suggestions?

    Can anyone help me to understand how to inform the user that their password has been changed, and either activate email notification or change the session message to remove the part about being sent a message?

    Thanks in advance!

    1516 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.