Showing user ID on user main page from screen options

You need to use the filter 'manage_' . $screen->id . '_columns' to add a column and manage_users_custom_column to display its value.

add_filter( 'manage_users_columns', 'column_register_wpse_101322' );
add_filter( 'manage_users_custom_column', 'column_display_wpse_101322', 10, 3 );

function column_register_wpse_101322( $columns ) 
{
    $columns['uid'] = 'ID';
    return $columns;
}

function column_display_wpse_101322( $empty, $column_name, $user_id ) 
{
    if ( 'uid' != $column_name )
        return $empty;

    return "<strong>$user_id</strong>";
}

With this, the ID will show up in the Screen Options as well.

Leave a Comment