Hide users without profile pics I'm working on a site that has logins for members, but I'd like to have a page that shows all members with a name and picture.
To do this, we had to import an existing database that doesn't have a lot of profile pics. Now I want to hide all users that have no picture uploaded. 

This is the code I'm trying, but with no luck...

{% if geslacht_param_string !=''  %}

{% set queryParams = {
    search: {
        query: geslacht_param_string,
        attribute: 'geslacht'               
    },
    geboortedatum : dateRange,
    order :'lastName',
    photo : ':notempty:'
} %}

{% else %}
    {% set queryParams = {
        geboortedatum : dateRange,
        order :'lastName',
        photo : ":notempty:"
    } %}
{% endif %}

{% set leden = craft.users(queryParams) %}


I can't find the decent syntax for :notempty:, can anyone help me out here? Thanks a lot!
There's no photo attribute on the UserElementType, so you can't query by it like you're trying.

Completely untested, but you can probably work around that with something like this:

{% if geslacht_param_string !=''  %}

{% set queryParams = {
    search: {
        query: geslacht_param_string,
        attribute: 'geslacht'               
    },
    geboortedatum : dateRange,
    order :'lastName',
} %}

{% else %}
    {% set queryParams = {
        geboortedatum : dateRange,
        order :'lastName',
    } %}
{% endif %}

{% set allUsers = craft.users(queryParams).find() %}

{% set usersWithPhotos = [] %}

{% for user in allUsers %}
    {% if user.photo %}
        {% set usersWithPhotos = usersWithPhotos|merge([user]) %}
    {% endif %}
{% endfor %}

There are {{ usersWithPhotos|length }} users with photos.