I am use this plugin https://wordpress.org/plugins/new-user-approve/

But in that there is no email notification given to admin when user approved.

Is any solution for that.


Omar_17 commented: Use hustle for sign up forms and subscribes or use webpushr it's more better to subscribe by notifications by the device +0

Recommended Answers

All 2 Replies

But there is approve_user function exits and there is wp_mail function inside itwhich fire when admin approve user? if i got you correct?


public function approve_user( $user_id ) {
        $user = new WP_User( $user_id );

        wp_cache_delete( $user->ID, 'users' );
        wp_cache_delete( $user->data->user_login, 'userlogins' );

        // send email to user telling of approval
        $user_login = stripslashes( $user->data->user_login );
        $user_email = stripslashes( $user->data->user_email );

        // format the message
        $message = nua_default_approve_user_message();

        $message = nua_do_email_tags( $message, array(
            'context' => 'approve_user',
            'user' => $user,
            'user_login' => $user_login,
            'user_email' => $user_email,
        ) );
        $message = apply_filters( 'new_user_approve_approve_user_message', $message, $user );

        $subject = sprintf( __( '[%s] Registration Approved', 'new-user-approve' ), get_option( 'blogname' ) );
        $subject = apply_filters( 'new_user_approve_approve_user_subject', $subject );

        // send the mail
        wp_mail( $user_email, $subject, $message, $this->email_message_headers() );

        // change usermeta tag in database to approved
        update_user_meta( $user->ID, 'pw_user_status', 'approved' );

        do_action( 'new_user_approve_user_approved', $user );
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.