Question

I'm writing a custom MembershipProvider for a legacy database. Users are authenticated by login and password, there is no e-mail attribute attached. What is the best way to "short-cycle" the FindUsersByEmail() and GetUserNameByEmail() methods? My naive approach was to leave them unimplemented, since I assume if there is no need to restore a password, there is also no need to look up users by e-mail -- does this have any side effects?

Was it helpful?

Solution

I would hazard a guess that you will be okay. A quick look at the dependcies in Reflector shows that these methods are only used by static methods of the Membership class.

However since these are public methods other 3rd party controls / APIs may assume they are implemented. It seems this is the case with some of the SharePoint API (see the private methods in grey) SPMembershipProviderPrincipalResolver uses both of these methods.

http://img143.imageshack.us/img143/7097/windowclipping3rn3.png

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top