So I still need a solution for the registration page. How do I get the invite code from the URL so I can query for the Invitee?
You could try the following.
Code:
SELECT `user_id`
FROM `#__comprofiler_plugin_invites`
WHERE `code` = '[invite_code]'
LIMIT 1
If that doesn't work you'll have to use a Code field and write the necessary PHP to do this since the invite code is actually stored in their user session data, which isn't accessible from the query field.
Have added a feature ticket to CB Invites to add an invited_by field to output the linked formatname of the user who sent the invite.
forge.joomlapolis.com/issues/8662