• Resolved ruipdguerra

    (@ruipdguerra)


    In the other post you said this would be the code to send a specific message when a new user is registed.
    But for some reason, the USERNAME, USEREMAIL, SITENAME and ADMINURL isnt working.

    Can you help?

    /**
     * Modify the contents of the message sent to the admin when a user signs up.
     *
     * @param $message The default message.
     * @return string the updated message.
     */
    function my_custom_message( $message ) {
    	$new_message = 'USERNAME (USEREMAIL) has requested a username at SITENAME' . "\n\n";
    	$new_message .= "SITEURL\n\n";
    	$new_message .= 'To approve or deny this user access to SITENAME go to' . "\n\n";
    	$new_message .= "ADMINURL\n\n";
    
            return $new_message;
    }
    
    // modify the message sent to the admin
    add_filter( 'new_user_approve_request_approval_message_default', 'my_custom_message' );

    https://ww.wp.xz.cn/plugins/new-user-approve/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Custom message admin for new user’ is closed to new replies.