I have written a custom membership provider for forms-based authentication to our SP site. The membership provider authenticates against our existing Users table in our DB.

There are a few bits of information that we store on the users in our table that I'd like to pass along and make use of within SharePoint. I'm wondering what is the best way to do this? The data is things like, for example, a unique internal user ID.

One way, which seems to work, is to have a custom MembershipUser class and add the information to this. I can access this within SharePoint via MembershipUser.GetUser().

I'm just wondering if this is the best way. Is there some way I could access custom properties via SPUser? Or maybe I should use User Profiles?


This sounds like a good use of the User Profile (based on what you wrote) though I would hope that there are other requirements that the User Profile can help with to make the effort worth it. One chalenge you will face is synchronizing the Profile with your custome DB, you will have to do that manually, with code.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.