fixing inner join bug which was causing email sending issues.
fixing inner join bug which was causing email sending issues.

Royal-Society-of-New-Zealand/NZ-ORCID-Hub,Royal-Society-of-New-Zealand/NZ-ORCID-Hub,Royal-Society-of-New-Zealand/NZ-ORCID-Hub,Royal-Society-of-New-Zealand/NZ-ORCID-Hub