Author saved as NULL when updating entries from a plugin I'm using a custom plugin with a service and controller to save relational fields to entries. I'm able to do this just fine, but when it saves an entry, it sets the author as NULL in the database and it no longer shows in the author's list of authored entries. 

I've tried to both not set the author at all and to manually set the author to the previous author. Craft gives me an Internal Service Error saying "Property 'Craft\EntryModel.author' is read only." when trying to set the author in the code. Removing the retrieval and setting of the author saves the entry but marks the author as NULL

Has anyone else faced this? Is it a bug?

For reference, here's the heart of this service's code:

    $criteria3 = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
    $criteria3-&gt;id = $kitId;
    $currentKit = $criteria3-&gt;first();
    $currentAuthor = $currentKit-&gt;author;

    $kit = new EntryModel();
    $kit-&gt;sectionId = '6';
    $kit-&gt;id = $kitId;

    $kit-&gt;author = $currentAuthor;
    $success = craft()-&gt;entries-&gt;saveEntry($kit);
Josh Angell's suggestion did work, I was just testing it on an entry that already had been updated with a NULL author. (Thanks Josh!)

For the record, I used $currentAuthor = $currentKit-&gt;authorId; to get my previous author, and then set the author with $kit-&gt;authorId = $currentAuthor. This does seem to maintain the author entirely.