Affects Version/s: 7.0.X, 7.1.X, Master
Component/s: User Management
If a user has permission to assign Site membership but is not a (regular) administrator, then when attempting to load assign a site to a user in an organization, the sites will show at first in the popup, but searching or using pagination will cause the results to no longer appear.
These can be considered the same issue as they involve similar use cases and have the same cause in the code.
Steps to reproduce:
1. Login as an admin user
2. Create 21 or more new blank Sites
3. Create a new organization
4. Assign a few users to the organization created in #3
5. Create a regular role
6. Click on the vertical ellipses next to the new role and select "Define Permissions"
7. Navigate to Control Panel -> Sites -> Sites -> select Assign Members (All Sites); then Save
8. Assign Organization Admin role and the custom role created in #5 to a user in the organization
9. Login as the user updated in #8
10. Go to (new user) -> My Account -> My Organizations > edit a user by clicking the vertical ellipses next to a different user listed
11. Scroll down to Sites and click "Select" button to launch Site Selector popup
12. Observe that the list of sites that the role user has Assign Members permission are shown in the popup
13. Search for the name of any of those sites already visible in the popup, or navigate using pagination
Expected result: The search returns the expected sites from the popup, and clicking to the second page of pagination shows the second page of sites
Actual result: No results are returned for either of these cases