     if updatedBy
       definition[updatedBy] =
         autoValue: ->
-          unless @isFromTrustedCode
+          if @isFromTrustedCode and @isUpdate and not @isSet
+            '0'
+          else
             if @isUpdate
               @userId
             else

            else
              @unset()

        regEx: SimpleSchema.RegEx.Id
        type: String

    if updatedAt

    if createdBy
      definition[createdBy] =
        autoValue: ->
          if @isFromTrustedCode and not @isSet
            '0'
          else
            if @isInsert
              @userId
            else if @isUpsert
