Password Field on Membership Request Web Part


We are trying to modify the FBA Pack to allow the password field to be shown on the membership request web part (while also having approval turned on). We have modified several lines of code, trying to strip out the checks for the membership review list being on. Can you advise on what areas we would need to change in order to have the following:

-> Password Entry on the Membership Request Web Part
-> Approval through the Membership Review List


There's some code that always turns the password field off if membership review is turned on. You'll have to disable that.

It doesn't work with the membership review because my initial thoughts were that the password would have to be stored in the membership review list, which would be insecure. If you want to do this though, you'll have to add a new field to the membership review list, and then store and retrieve the password from there.

Another way around it might be to simply store the password with the membership user that's created as a placeholder during the inital user registration. Right now when the member is approved, that user is deleted and recreated. Instead you could just use the existing user, which should have the user's password. This is on my todo list for the FBA Pack, but I have not gotten to it.

We have searched the code fairly well for where that check occurs, yet we can't find it. Could you provide some direction on what file that check (if membership review is turned on) occurs in?


MembershipRequestWebPart.cs Line 213

I am wondering if there is somewhere else these checks are being done, because, we have changed the below code and the password fields are still not visible. We uncheck the "Auto Generate Password" checkbox and it re-checks it for us. This is what we have changed:
 public bool AutoGeneratePassword
                //Passwords must be auto generated if reviewing membership requests
                //if (_Settings.ReviewMembershipRequests)
                //    return true;
                return false;
            set { _AutoGeneratePassword = false; }

I think what you have done should do it - I believe that's the only place that should be changed. My guess is that your changes are not getting deployed to the server. To check, make another change somewhere else in the code that will be visible on the server.

I believe you could also do visible="true" for the password fields in the CreateUserTemplate user control. It's set to false by default which is what causes the validation of whether the fields should be displayed or not.