Invite emails are essentially just reset password emails with a different template (though this can and probably will change (slightly) in the near future)
This patch proposes behavioral changes. In particular, referring systems will need to provide client ids under all circumstances.