User IP being sent in notification emails
Hi everyone,
I’ve been made aware of an issue with the notification emails about responses to questions on our forum.
The notification email sent to a user contained the email address and IP of the user who responded. This is definitely not the kind of information we want our users to be able to view.
Are you aware of any filters/hooks/options I can use to edit the anspress email templates?
Many thanks
Alex
It’s not Anspress, it’s the core WP Comments. This can be filtered like so…
<?php
// The standard wp comments email contains the users IP and email address. This is a privacy issue,
// so we need to amend the contents of the email
add_filter(‘comment_notification_text’, ‘comment_notification_text_override’, 12, 2);
function comment_notification_text_override($notify_message, $comment_id){
$notify_message = <<<HERE
BUILD A NEW MESSAGE HERE!
HERE;
return $notify_message;
}
I don’t see that in ANY email.
Can you provide some kind of capture or message text ?
Yea, it’s the core comments email template. Ok I can sort this
I think it might be the core wp comments email actually. The user had posted an answer, then I replied in a comment – like this – then the notification to the user included my email and IP.