I have an issue that I need assistance with. I want to add more columns to the membership request web part like address, a drop down for license category and company name. I was able to create the fields in visual studio but I’m not sure which backend file I need to edit so that these are submitted to the database. Also do I need to create these additional columns in the database or they are just added automatically when I create the solution. If possible, is there a step by step approach for achieving this.
Usually when I make field customizations they are only for SharePoint, so instead of saving them back to the membership database I save them to the user’s profile in SharePoint. If you do want to store the profile properties in the membership database, take a look at the Profile Provider:
Sorry to continue asking questions on this topic, but I have a few issues that I would be really grateful if you give me more clarity on. So I have added a control “Address” on the webpart. I am trying to follow step by step for adding the backend code using an exiting column “FirstName”. My issue is that within the MembershipRequest.cs where do I exactly add the code to update the “Address” field in the SharePoint User Profile List is it within the ApproveMemberShip() method.
You’re going to want to add it everywhere in the code that the spuser gets updated. To make sure it’s actually running properly, you can try to run it in debug mode. Or maybe add a temporary button to the webpart and have it write some messages to the screen to ensure that your code is being run.
i would like to add new fields in FBA user management form for my SP2019 site, can you share me the code to pass the parameters to below methos.
Utils.BaseMembershipProvider().CreateUser(txtUsername.Text, txtPassword.Text, txtEmail.Text, txtQuestion.Text, txtAnswer.Text, isActive.Checked, null, out createStatus);
i am new to sharepoint, so please share the code and process step by step clearly
The membership provider’s createuser function doesn’t allow for extra fields to be added, so you have to store them elsewhere, like in the SharePoint user profile using the code listed above.
If you want to know how to call CreateUser, the actual code for the FBA Pack is available on Github. You can see the specific line here: