Get Property Value
UserInfo objInfo = new UserInfo(); // DNN Classes
objInfo = UserController.GetUserById(“Pass potal ID”, “Pass user id”);
if (objInfo != null)
{
string txt = objInfo.Profile.GetPropertyValue(“Property Name”);
}
Set Property Value
UserInfo objInfo = new UserInfo(); // DNN Classes
objInfo = UserController.GetUserById(“Pass potal ID”, “Pass user id”);
if (objInfo != null)
{
objInfo.Profile.SetProfileProperty(“Property Name”, “Property Value”);
//Update user profile
DotNetNuke.Entities.Profile.ProfileController.UpdateUserProfile(objInfo, objInfo.Profile.ProfileProperties);
}