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
When I create members I want to fill the property "Comments" (member property on Membership tab). How can I do that?
var membershipHelper = new MembershipHelper(UmbracoContext);
UmbracoRegisterModel regModel = membershipHelper.CreateRegistrationModel("Member");
regModel.Password = Membership.GeneratePassword(
regModel.Email = model.Email;
regModel.Name = model.Company;
regModel.Username = model.Name;
regModel.LoginOnSuccess = true;
regModel.UsernameIsEmail = false;
membershipHelper.RegisterMember(regModel, out status);
Have you tried the MemberService instead?
// change the model properties
var member = Services.MemberService.CreateMemberWithIdentity(model.Username, model.Email, model.Name, "YourMemberTypeHere");
member.SetValue("Comments", "A comment");
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted