Hi all I've upgraded to 4.7 and I'm getting the following warning.. the problem with using the standard membership info is then how am I supposed to access a member's properties
Some code that may help someone else in the same situation :-)
string[] rolesArray;
// get currently logged in uservar member = System.Web.Security.Membership.GetUser();
rolesArray = Roles.GetRolesForUser();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("Roles for " + member.UserName);
foreach (string role in rolesArray)
{
sb.Append(role);
}
var profile = ProfileBase.Create(member.UserName);
profile.SetPropertyValue("datePlanExpires", DateTime.Now.AddDays(30));
profile["interests"] = sb.ToString();
profile.Save();
Member.GetMemberFromLoginName Obselete..
Hi all I've upgraded to 4.7 and I'm getting the following warning.. the problem with using the standard membership info is then how am I supposed to access a member's properties
Bump !!!
Some code that may help someone else in the same situation :-)
btw read http://our.umbraco.org/wiki/how-tos/membership-providers for more info
Cheers Simon,
Most appreciated!!
Pleasure - little late to help you but hopefully will get someone out of the same hole we were both in :-)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.