Reputation: 3213
I'm developing a custom DNN module that needs to gather sensitive information from users for a payment gateway onboarding process. We want to leverage the DNN User Profile module and create additional required fields. I've located DotnetNuke.Entities.Users.UserProfile as well as DotNetNuke.Security.Profile.ProfileProvder.GetUserProfile(UserInfo). Which namespace is our best option to read the user profile values?
Upvotes: 1
Views: 699
Reputation: 3310
using DotNetNuke.Entities.Profile;
UserInfo oUserInfo = UserController.GetUserById(PortalSettings.PortalId, iUserID);
string sCustomProperty = oUserInfo.Profile.GetPropertyValue("customproperty");
Upvotes: 1
Reputation: 35554
You can read profile data like this
using DotNetNuke.Entities.Profile;
ProfilePropertyDefinition ppd = UserInfo.Profile.GetProperty("FirstName");
string FirstName = ppd.PropertyValue;
Upvotes: 4