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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...