Index user_login instead of display name

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// Add to your (child) theme’s functions.php
add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘post_author’ == $params[‘facet_source’] ) {
$user = get_user_by( ‘id’, $value );
if ( false !== $user ) {
$params[‘facet_display_value’] = $user->user_login;
}
}
return $params;
}, 10, 2 );

{{/gist}}