# Tutor LMS: Enrolled Courses Column in Users

> Adds a "Courses" column to the Users screen showing how many Tutor LMS courses each user is enrolled in.

- Type: PHP
- Runs: Admin only
- Category: [Courses & Community](https://wpide.com/library/category/learning/)
- Tags: tutor, users, reporting
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/tutor-enrolled-courses-users-column/

## Code

```php
if ( ! function_exists( 'tutor_utils' ) ) {
    return;
}

add_filter( 'manage_users_columns', function ( $columns ) {
    $columns['wpide_tutor_courses'] = 'Courses';

    return $columns;
} );

add_filter( 'manage_users_custom_column', function ( $output, $column, $user_id ) {
    if ( 'wpide_tutor_courses' !== $column ) {
        return $output;
    }

    $ids = (array) tutor_utils()->get_enrolled_courses_ids_by_user( $user_id );

    return $ids ? esc_html( number_format_i18n( count( $ids ) ) ) : '&mdash;';
}, 10, 3 );
```

## Notes

Uses Tutor's own enrollment records.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Tutor LMS: Enrolled Courses Column in Users" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
