Solved

EnablePasswordRetrieval Custom MembershipProvider

Posted on 2007-11-16
2
957 Views
Last Modified: 2012-06-27
I have created a custom membership provider. I have EnablePasswordRetrieval set to true in my config. In my custom provider, I have code to retrieve the password.

But now I am using the PasswordRecovery control and I'm not sure what I need to do with it to get it to mail the password to the user.

Is my code supposed to handle the mailing of the password? What happens when they click the button to submit the form?

Also, can that form be altered to enter the email address instead of the user name and look it up by that?

thanks!
0
Comment
Question by:BobCSD
2 Comments
 
LVL 16

Accepted Solution

by:
McExp earned 450 total points
ID: 20302046
The following MSDN pages should give you what you need: -

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

http://msdn2.microsoft.com/en-us/library/ms178341(vs.80).aspx

I'm not sure if you can use the email instead using the stock component, however if you've already the functions to retreive the password, it's not that hard to impliment this from scratch.

Getting a user from the Membership provider, is as follows:-

 MembershipUser UserToRemind = Membership.FindUsersByEmail("email@toMatch.com");
0
 
LVL 27

Assisted Solution

by:Sammy
Sammy earned 50 total points
ID: 20302066
Yes  your code should handle sending the email with the password to the user, after all its your custom provider.
thats being said, the password can not be hashed. simply hashed password will be useless to send to the user since it's not readable
if you inherited from native membership providers, you can use GetPassword to retrieve the password
more on the membership providers here http://msdn2.microsoft.com/en-us/library/f1kyba5e(vs.80).aspx

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now