It looks pretty much like there is an 8.0.4 bug in the method GetUsersAdvancedSearch. I am executing the following where PortalID = 0, whereNames='PreferredLocale' and whereValues='en-US' and getting 0 records in the filteredUsers list:
List<UserInfo> filteredUsers = (List<UserInfo>) UserController.Instance.GetUsersAdvancedSearch(PortalController.Instance.GetCurrentPortalSettings().PortalId, -1, -1, -1, -1, true, -1, 0, null, false, whereNames, whereValues);
What is most interesting is that if I directly execute the stored procedure associated with this method, I do get the results correctly:
USE [dnndev.me]
GO
DECLARE @return_value int
EXEC @return_value = [dbo].[GetUsersAdvancedSearch]
@PortalID = 0,
@UserId = -1,
@FilterUserId = -1,
@FilterRoleId = -1,
@RelationshipTypeId = -1,
@IsAdmin = true,
@PageSize = -1,
@PageIndex = 0,
@SortBy = NULL,
@SortAscending = false,
@PropertyNames = 'PreferredLocale',
@PropertyValues = 'en-US'
SELECT 'Return Value' = @return_value
GO
I'm not sure how to resolve, but it honestly should not be this hard to run a query of the users.