GetPassword()

Posted by Community Admin on 04-Aug-2018 14:14

GetPassword()

All Replies

Posted by Community Admin on 20-Sep-2011 00:00

hi

i'm having a right mare trying to use GetPassword(), it always returns with the "Password retrieval is not Enabled" error.
I guess Im doing something idiotic but cant see it for the life of me.

In the web.config I have my defaultprovider set with

<membership defaultProvider="Default">
    <providers>
        <clear/>
        <add name="Default" enablePasswordRetrieval="true" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Encrypted" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity"/>
    </providers>
</membership>

and in my code I have

UserManager usrMan = new UserManager();
MembershipUser user = Membership.GetUser(usrMan.GetUserByEmail(txtEmailAddress.Text).UserName);
string password = user.GetPassword();

which finds the correct user but wont let me have the password. Is there somewhere else I should make a change. I have a password reset (in 3.7) which works fine.

tia
tim

Posted by Community Admin on 20-Sep-2011 00:00

Hello Tim,

Can you please take a look at this forum thread, I believe you might find it useful in achieving the desired functionality - it contains a brief walkthrough on the password retrieval mechanisms in Sitefinity, and several code samples and screenshots of important settings in the backend configurations, in order to be able to retrieve the users's passwords.

Greetings,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed