SharePoint 2019 - Creating Custom Columns For The FBA Membership Request

Hi again,

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.

My sample code looks like below:

        SPUser sPUser = web.EnsureUser(request.UserName);
        SPListItem userItem = web.SiteUserInfoList.GetItemById(sPUser.ID);
        userItem["Address"] = request.Address;
        userItem.Update();

I tried inserting it below this line but nothing happened

newUser = membership.CreateUser(request.UserName, request.Password, request.UserEmail, null, null, true, null, out createStatus);

Regards,