Support

Account

Home Forums General Issues User with apostrophe in name not found Reply To: User with apostrophe in name not found

  • ACF uses the WP function get_users() with it’s defaults. By default WP only looks in ID, user_ligin, user_email, user_url and user_nicename.

    To look in other fields you’d need to alter the query parameters. This can be done using the hook acf/fields/user/query. I don’t think this one is documented here.

    This is from the ACF code

    
    // filters
    $args = apply_filters("acf/fields/user/query", $args, $field, $options['post_id']);
    $args = apply_filters("acf/fields/user/query/name={$field['_name']}", $args, $field, $options['post_id']);
    $args = apply_filters("acf/fields/user/query/key={$field['key']}", $args, $field, $options['post_id']);
    

    I think you’ll need to supply custom ‘search_columns’, but I’m not 100% sure