I'm trying to search all community users to get a list of people who do not have a custom attribute set.
Using the query StringCriterion, is there a way to match against null rather than a value?
I've tried the following code, but it doesn't work.
private static UserCollection GetAllUsersWithNoCode()
{
UserQuery query = new UserQuery();
StringCriterion criterion = new StringCriterion();
criterion.Value = null;
query[AttributeNames.CommunityUser.AUTO_LOGIN_TOKEN] = criterion;
return CommunitySystem.CurrentContext.DefaultSecurity.GetQueryResult(query);
}
Thanks in advance for anyone who can help...