Impersonation not working even for admin users.


When you try to impersonate a user, no users are returned in the list and you get the message "No Matches found".


If you check the debug SQL you will find this query:

SELECT ... FROM sys_user sys_user0 WHERE ((sys_user0.`name` LIKE 'a%' AND sys_user0.`name` IS NOT NULL ) OR (sys_user0.`sys_id` LIKE 'a%' AND sys_user0.`sys_id` IS NOT NULL ) OR (sys_user0.`user_name` LIKE 'a%' AND sys_user0.`user_name` IS NOT NULL )) AND (sys_user0.`active` = 1 AND sys_user0.`locked_out` = 0 AND 0 = 1) /*...*/ 

This is checking for 0 = 1 which is resulting in no user to return while trying to impersonate.

Check the property "glide.invalid_query.returns_no_rows" if it is set to true then this is causing the issue.



Setting the property "glide.invalid_query.returns_no_rows" to false fixes the issue.