# Tutor LMS: Email the Admin About New Student Sign-Ups

> Emails the site admin when someone registers through the Tutor LMS student registration form.

- Type: PHP
- Runs: Run everywhere
- Category: [Courses & Community](https://wpide.com/library/category/learning/)
- Tags: tutor, registration, email
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/tutor-notify-admin-new-student/

## Code

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

add_action( 'tutor_after_student_signup', function ( $user_id ) {
    $user = get_userdata( $user_id );

    if ( ! $user ) {
        return;
    }

    wp_mail(
        get_option( 'admin_email' ),
        sprintf( '[%s] New student: %s', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $user->display_name ),
        sprintf( "A new student signed up.\n\nName: %s\nEmail: %s\nProfile: %s", $user->display_name, $user->user_email, admin_url( 'user-edit.php?user_id=' . (int) $user_id ) )
    );
} );
```

## Notes

Only Tutor's student sign-up form triggers this email, not other registration forms.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Tutor LMS: Email the Admin About New Student Sign-Ups" 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/
