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 "sam@example.edu" and email "sam@example.edu"
2. Create new user with username "sam-student@example.edu" and email "sam@example.edu"
3. Go to a course site -> Site Info -> Add Participants
4. Attempt to add user "sam@example.edu"
It is impossible to add the first user (eid and email = sam@example.edu) because the email lookup runs first. Shouldn't the EID lookup occur first?
https://sakaiproject.atlassian.net/browse/SAK-10762#icft=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 "sam@example.edu" and email "sam@example.edu"
2. Create new user with username "sam-student@example.edu" and email "sam@example.edu"
3. Go to a course site -> Site Info -> Add Participants
4. Attempt to add user "sam@example.edu"
It is impossible to add the first user (eid and email = sam@example.edu) because the email lookup runs first. Shouldn't the EID lookup occur first?
Patch attached.