Copied to clipboard

Flag this post as spam?

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


  • Johan Plesner Hamann 105 posts 199 karma points
    Mar 12, 2012 @ 21:04
    Johan Plesner Hamann
    0

    Member new password in razor

    I'm trying to get members to change passwords.

    I have searched a lot and found this.
    http://our.umbraco.org/wiki/how-tos/membership-providers

    my web.config is.

    <add name="UmbracoMembershipProvider" 
    type="umbraco.providers.members.UmbracoMembershipProvider" 
    enablePasswordRetrieval="true" 
    enablePasswordReset="true" 
    requiresQuestionAndAnswer="false" 
    defaultMemberTypeAlias="CalendarMember" 
    passwordFormat="Hashed" />
    
    Razor is
     var m = Membership.GetUser(username);
     m.ChangePassword(m.ResetPassword(), pass);

    and..

      Member member = Member.GetMemberFromEmail(username);
      member.Password = pass;  
      member.Save();

    error is

    Error loading Razor Script Calender/Members/resetPass.cshtml
    Provider can not retrieve hashed password 
    (d:\web\localuser\genzai.dk\public_html\web.config line 132)

    and it does not work for me.

    should I try..

    passwordFormat="clear"

    what are the consequences

    /Johan

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Mar 12, 2012 @ 21:26
    Tom Fulton
    0

    Hi Johan,

    The first Razor snippet you pasted should be enough - is there a reason you're trying to set it again via the Member API?  Or is that just two different ways you tried?  What line does the error happen on?

    -Tom

  • Johan Plesner Hamann 105 posts 199 karma points
    Mar 12, 2012 @ 21:54
    Johan Plesner Hamann
    0

    they are different.

    the line is 132 in web.config.

    and I must have this  enablePasswordRetrieval = false or I canĀ“t login.

     

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft