A customer has found an issue where searching for users to add to a site causes errors in the logs when impersonating a user assigned the site role Site Administrator. Errors in the logs say that the customer is unable to impersonate the user. They are able to search for users when they are actually logged in as the user and add them with no errors in the logs.
- Create a new user.
- Add the new user to site 'Liferay'.
- Assign the site role 'Site Administrator' to the new user.
- Impersonate the new user and go to site 'Liferay'.
- Navigate to Site Administration > People > Memberships.
- Press the blue + button and search for a random member using the search bar on the pop-up window.
Expected: Member search shows search results of the desired member
Actual: Member search shows search results but also produces a stacktrace that has numerous errors, as seen below: