SAK-10762 introduced the ability to "Add Participants" by "Official Email Address or Username".
The problem is that the SiteAction code first does a lookup based on email address and not username (eid). Sakai allows internal users to have multiple accounts with the same email address. This can make it impossible to add a user by EID because of the email lookup.
Steps to replicate:
1. Create new user with username "email@example.com" and email "firstname.lastname@example.org"
2. Create new user with username "email@example.com" and email "firstname.lastname@example.org"
3. Go to a course site -> Site Info -> Add Participants
4. Attempt to add user "email@example.com"
It is impossible to add the first user (eid and email = firstname.lastname@example.org) because the email lookup runs first. Shouldn't the EID lookup occur first?