Fix member directory's search query

This commit is contained in:
champsupertramp
2016-02-23 16:27:40 +08:00
parent 589fec5bd9
commit 0262e29e1e
+13 -4
View File
@@ -126,11 +126,20 @@
$query_args['meta_query']['relation'] = 'AND';
// must have a profile photo
if ( $has_profile_photo == 1 ) {
if ( $has_profile_photo == 1 && ! um_get_option('use_gravatars') ) {
$query_args['meta_query'][] = array(
'key' => 'profile_photo',
'value' => '',
'compare' => '!='
'relation' => 'OR',
array(
'key' => 'synced_profile_photo', // social login
'value' => '',
'compare' => '!='
),
array(
'key' => 'profile_photo', // from upload form
'value' => '',
'compare' => '!='
)
);
}