Pass additional parameter to Custom Membership provider's ValidateUser()?

Just create an overridden version of your Validate method, taking 3 parameters and call it directly like: ((MyCustomMembershipProvider)Membership. Provider). Validate( username, pass, anything ) The only drawback of such approach is that you can no longer rely on the automatic invocation of the two-parameter version of the Validate method if and only if it is automatically called from somewhere (for example from the asp:Login control).

Just create an overridden version of your Validate method, taking 3 parameters and call it directly like: ((MyCustomMembershipProvider)Membership. Provider). Validate( username, pass, anything ); The only drawback of such approach is that you can no longer rely on the automatic invocation of the two-parameter version of the Validate method, if and only if it is automatically called from somewhere (for example from the asp:Login control).

Like this: username|userType. Of course, you should forbid entering delimiter in username field.

I have a class "User" that is inherited by two other classes(LocalUser and Donor). I have created a custom membership provider for ASP.net forms authentication and overridden the ValidateUser() method. In the ValidateUser() method of my custom membership provider, I need to pass in a parameter to know whether the "User" to validate is "LocalUser" or "Donor" and accordingly validate the user against the database.

The problem is that ValidateUser() takes only two parameters (username and password). So there is no scope for me to push in another one. One thing that came to my mind was to set a session variable but then I was looking for a cleaner approach.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions