Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
public static Umbraco.Core.Models.IMember RegisterMember(RegistrationViewModel rw) { var service = ApplicationContext.Current.Services.MemberService; var m = service.CreateMemberWithIdentity(rw.Username, rw.Username, rw.Surname + " " + rw.Name, "Member"); m.IsApproved = false; service.SavePassword(m, rw.Password); service.AssignRole(m.Id, "Newsletter"); service.Save(m); return m;
Here is my code. What I need to do is to set custom property values, but I don't find a way to access the member properties or the Profile Model.
Any suggestion?
Thank you
Try this before you use .Save :
m.SetValue("customPropAlias", value)
Jeroen
My bad :/
Could you please mark a post as the solution if it helped you.
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.
Continue discussion
u7 Setting member custom properties
Here is my code. What I need to do is to set custom property values, but I don't find a way to access the member properties or the Profile Model.
Any suggestion?
Thank you
Try this before you use .Save :
Jeroen
My bad :/
Could you please mark a post as the solution if it helped you.
Jeroen
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.