Change Content Owner

Topics: Writing modules
Oct 26, 2014 at 8:43 PM
Edited Oct 26, 2014 at 8:43 PM
Is it possible to change the owner of a Page via code?

Thanks =)
Oct 26, 2014 at 9:32 PM
I believe I have accessed the Content Item like this:
var welcomePage = contentManager.Query(VersionOptions.Published, "Page").Join<TitlePartRecord>().Where(t => t.Title == "Welcome").List().FirstOrDefault();
so now I just need to be able to set the Owner ID on the Common Part and save it. Any suggestions? Thanks!
Oct 26, 2014 at 9:39 PM
and...figured it out =)
var welcomePage = contentManager.Query(VersionOptions.Published, "Page").Join<TitlePartRecord>().Where(t => t.Title == "Welcome").List().FirstOrDefault().As<CommonPart>();

welcomePage.Owner = tenantAdmin;
tenantAdmin is an IUser that I created