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
Need to add custom properties to a member and populate them via code.
How can you do this in v9?
Well the properties are set in the backoffice (just like documenttypes), but in code you can do this.
You first need to get the alias of the field, if you're using modelsbuilder you can do it like this:
var customMemberProperty = Member.GetModelPropertyType(_publishedSnapshotAccessor, x => x.CustomMemberProperty).Alias;
or just use the string alias of the field, in this case "customMemberProperty".
Then get the member by various means (email or id for example)
var memberToUpdate = _memberService.GetByEmail(emailAddress);
Then update the values:
And save them
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted