Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 13:42
    Claushingebjerg
    0

    How to let member retrieve login and password

    Ive got a site, where members can log in. But members forget their logins.
    So i would like a function to let them enter their email, and retrieve their login credentials in an email

    I have this so far:

    <asp:PasswordRecovery ID="PasswordRecovery1" Runat="server" SubmitButtonText="Send Password" SubmitButtonType="Link">
      <MailDefinition From="[email protected]" Subject="dit password" BodyFileName="PasswordMail.txt" />
    </asp:PasswordRecovery>

    When submitting the form i get the following message

    "We were unable to access your information. Please try again."

    even though there is a member with the entered email exists. mWhat am i missing?

    Please note, im a frontend dev, so im not into advanced .net!

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 05, 2010 @ 14:17
    Matt Brailsford
    0

    Hi claushingebjerg,

    I'm not 100% sure, but it might be related to the fact that by default the Umbraco membership provider has enablePasswordRetreival set to false, and passwordFormat set to hashed.

    If you want to enable this, you'll need to update these definitions in the web.config, setting enablePasswordRetreival to true, and passwordFormat to eaither Clear or Encyrpted (You may have to try these, as I'm not sure whether the Umbraco membership provider implements these or not).

    You can find more info on configuring a membership provider here:

    http://odetocode.com/Articles/427.aspx

    Cheers

    Matt

  • Happyfanaticsalsero 59 posts 81 karma points
    Nov 05, 2010 @ 14:18
    Happyfanaticsalsero
    0

    check your web.config, it might be that there are some wrong settings...

    • enablePasswordRetrieval="false"
    • enablePasswordReset="true"
    • requiresQuestionAndAnswer="false"

    Also, make sure the mail part (smtp server settings etc) in the web.config are working, obviously you'll still not see any mail coming through if this is not set up properly.

    I hope this helps;

    /HFS

  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 15:32
    Claushingebjerg
    0

    I'vw no changed the web.config to

    <add name="UmbracoMembershipProvider" 
    type="umbraco.providers.members.UmbracoMembershipProvider"
    enablePasswordRetrieval="true"
    enablePasswordReset="false"
    requiresQuestionAndAnswer="false"
    defaultMemberTypeAlias="intranetuser" />

    Where "intranetuser" is the alias for the member type i wnat to retrieve info about, but i still get "We were unable to access your information. Please try again." on the front end...

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 05, 2010 @ 15:36
    Matt Brailsford
    0

    Hi claushingebjerg,

    You may need to create a new user, as the original user will probably still have their password hashed (which is one way encrytped, so can't be retreived), plus as mentioned previously, you'll need to set the passwordFormat to something other than Hashed.

    Cheers

    Matt

  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 15:47
    Claushingebjerg
    0

    But but but.... isnt passwords in plaint text by default ??? is it not only if i want them hashed i need to add

    passwordFormat="Hashed"

     

    As is there is no passwordformat defined on the UmbracoMembershipProvider in my web.config...

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 05, 2010 @ 15:52
    Matt Brailsford
    0

    hmmm, I'm not sure. Least if you declare it, you know =)

    passwordFormat="Clear"

    Matt

  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 15:55
    Claushingebjerg
    0

    I was actually a small step ahead htere :).
    I did that just now, and created a new member afterwards. But unfortunately get the same result... "We were unable to access your information. Please try again."

    My webconfig now looks like:

    <add name="UmbracoMembershipProvider" 
    type="umbraco.providers.members.UmbracoMembershipProvider"
    enablePasswordRetrieval="true"
    enablePasswordReset="false"
    requiresQuestionAndAnswer="false"
    defaultMemberTypeAlias="intranetuser"
    passwordFormat="Clear" />

     

     

     

  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 15:56
    Claushingebjerg
    0

    btw my smtp settings are ok, Contour works ok.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 05, 2010 @ 16:10
    Matt Brailsford
    1

    Hmmm, seems like that's the default error message for invalid username.

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.passwordrecovery.usernamefailuretext.aspx

    You could try setting the different message attributes on the PasswordRecovery control to try and narrow it down to what is failing?

    Matt

  • Claushingebjerg 936 posts 2571 karma points
    Nov 05, 2010 @ 16:34
    Claushingebjerg
    0

    this is highly emberrasing. I so need som weekend off time!!!!!!

    For the last hours i have input the members email adress, not the user name... Inputting the user name works like a charm! DOH

     

    Thanks Matt

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 05, 2010 @ 16:41
    Matt Brailsford
    0

    Hehe,

    We've all been there =)

    Glad you've got it working never the less

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft