Adding content to a wp_mail
-
I am trying to add the First and Last name of the registered user to the confirmation email that goes to the website owner, once the user has validated their email.
I believe the code responsible for generating said email is in the simplr-reg-page.php file:
function simplr_activate_users( $ids = false ) { if( !$ids ) { if( @$_REQUEST['action'] == 'sreg-activate-selected' AND !empty($_REQUEST['users']) ) { simplr_activate_users( $_REQUEST['users'] ); } } else { global $wpdb,$simplr_options; foreach( $ids as $id ) { $return = $wpdb->update( $wpdb->users, array( 'user_status'=> 0 ), array( 'ID' => $id ), array('%d'), array('%d') ); if( !$return ) { return new WP_Error( "error", "Benutzer konnte nicht aktiviert werden." ); } $data = (array) get_userdata( $id ); $data = (array) $data['data']; $data['blogname'] = get_option('blogname'); do_action('simplr_activated_user', $data); $subj = simplr_token_replace( $simplr_options->mod_email_activated_subj, $data ); $content = simplr_token_replace( $simplr_options->mod_email_activated, $data ); $headers = "From: ".$data['blogname']."<".get_option('admin_email').">\r\n"; wp_mail( $data['user_email'], $subj, $content); wp_mail('[email protected]', $subj, $content ); wp_mail('[email protected]', $subj, $content ); return $return; } }
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
…where I have added the two email call functions, (one to me, one to the website owner), and I now would like to include the First and Last Name of the user, in order to be able to distinguish one validation from another.
- The topic ‘Adding content to a wp_mail’ is closed to new replies.