Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tobias Lopez 64 posts 210 karma points
    Dec 04, 2014 @ 09:05
    Tobias Lopez
    0

    How to change password of a Member

    Hi everyone!

    I want to implement a "Password forgot" controller, but cant find a way to do this.

    I looked into the documentation. i found the ChangingPasswordModel() but for this i need the old password and i cant find a way to get this...

    Also how can i get the ProfileModel by username or email?

    Thanks for any reply

  • ianhoughton 281 posts 605 karma points c-trib
    Dec 04, 2014 @ 09:26
    ianhoughton
    103

    I believe this is what your after:

    _memberService = ApplicationContext.Current.Services.MemberService;
    
    var member = _memberService.GetByEmail("memberEmailAddressHere");
    
    _memberService.SavePassword(member,"newPasswordHere");
  • Tobias Lopez 64 posts 210 karma points
    Dec 05, 2014 @ 11:05
    Tobias Lopez
    0

    Whoooop awesome!

    This memberservice is never mentioned in the documentation :(

    Thank you!

  • Hundebol 167 posts 314 karma points
    Dec 09, 2014 @ 13:52
    Hundebol
    0

    This is great - works! But could someone please tell me, if there is an easy way to turn this into a form?

    I mean, a field to input the email adress, the new password and then a submit button

    Is it possible to do in the same Partial View Macro File?

Please Sign in or register to post replies

Write your reply to:

Draft