Update the author_uid for an entity registration
(a) hook_entity_presave() should work, giving you access to the entity, before it is persisted, e.g.:

/**
 * Implements hook_entity_presave().
 */
function registration_alterations_entity_presave($entity, $type) {
  if ($type === 'registration' &amp;&amp; $entity-&gt;author_uid === 0)) {
    $entity-&gt;author_uid = variable_get('registration_alterations_anonymous_registrations_reassign_uid');
  }
}


(b) Alternatively, you could use hook_field_attach_submit(), which is also triggered inside registration_form_submit() and would give you access to the submitted form in case you needed it. This would look similar to (a):

/**
 * Implements hook_field_attach_submit().
 */
function registration_alterations_field_attach_submit($entity_type, $entity, $form, &amp;$form_state) {
  if ($entity_type === 'registration' &amp;&amp; $entity-&gt;author_uid === 0)) {
    $entity-&gt;author_uid = variable_get('registration_alterations_anonymous_registrations_reassign_uid');
  }
}


Good luck!