From 64d62038cd8e2e69eb101c5256ea458cff98ae10 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sun, 20 Nov 2011 04:15:44 -0500 Subject: [ticket/10446] DRY X-AntiAbuse header addition. PHPBB3-10446 --- phpBB/includes/functions_messenger.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'phpBB/includes/functions_messenger.php') diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 08c686d9e3..04b2502210 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -162,6 +162,18 @@ class messenger $this->extra_headers[] = trim($headers); } + /** + * Adds X-AntiAbuse headers + */ + function anti_abuse_headers($headers) + { + global $config, $user; + $this->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); + $this->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); + $this->headers('X-AntiAbuse: Username - ' . $user->data['username']); + $this->headers('X-AntiAbuse: User IP - ' . $user->ip); + } + /** * Set the email priority */ -- cgit v1.2.1