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 "firstname.lastname@example.org" and email "email@example.com"
2. Create new user with username "firstname.lastname@example.org" and email "email@example.com"
3. Go to a course site -> Site Info -> Add Participants
4. Attempt to add user "firstname.lastname@example.org"
It is impossible to add the first user (eid and email = email@example.com) because the email lookup runs first. Shouldn't the EID lookup occur first?