MDL-45319 events: added debugging messages for missing relateduserid value
MDL-45319 events: added missing validation
MDL-45319 events: documented the additional validation