I am performing this sequence of actions within a controller function
var user = _contentManager
.Where(u => u.Id == viewModel.UserId)
dynamic ci = user.ContentItem;
ci.NewsletterSignUpPart.NewsAlert = viewModel.NewsAlert;
ci.NewsletterSignUpPart.ProductUpdate = viewModel.ProductUpdate;
model = _contentManager.UpdateEditor(user, this);
I have created my own NewsletterSignUpPart which is a part of a UserPart. The properties of this part are boolean values.
Calling UpdateEditor modifies the properties of the NewsletterSignUp part for the user, BUT also removes all User roles for the user and I don't know why it is doing this.
Can anyone shed any light on this?