mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-29 12:43:15 +01:00
[ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().
PHPBB3-10446
This commit is contained in:
parent
a7077c9149
commit
37c7668193
@ -195,7 +195,7 @@ class acp_email
|
||||
|
||||
$messenger->template('admin_send_email', $used_lang);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->subject(htmlspecialchars_decode($subject));
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
@ -118,7 +118,7 @@ class acp_inactive
|
||||
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']))
|
||||
@ -206,7 +206,7 @@ class acp_inactive
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
||||
|
@ -348,7 +348,7 @@ class acp_users
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
|
||||
@ -403,7 +403,7 @@ class acp_users
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']))
|
||||
|
@ -164,11 +164,14 @@ class messenger
|
||||
|
||||
/**
|
||||
* Adds X-AntiAbuse headers
|
||||
*
|
||||
* @param array $config Configuration array
|
||||
* @param user $user A user object
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function anti_abuse_headers()
|
||||
function anti_abuse_headers($config, $user)
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
$this->headers('X-AntiAbuse: Board servername - ' . mail_encode($config['server_name']));
|
||||
$this->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$this->headers('X-AntiAbuse: Username - ' . mail_encode($user->data['username']));
|
||||
|
@ -117,7 +117,7 @@ class ucp_activate
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']))
|
||||
|
@ -150,7 +150,7 @@ class ucp_profile
|
||||
|
||||
$messenger->to($data['email'], $data['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($data['username']),
|
||||
|
@ -366,7 +366,7 @@ class ucp_register
|
||||
|
||||
$messenger->to($data['email'], $data['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
|
||||
|
@ -94,7 +94,7 @@ class ucp_resend
|
||||
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
|
||||
@ -130,7 +130,7 @@ class ucp_resend
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']),
|
||||
|
@ -1945,7 +1945,7 @@ class install_install extends module
|
||||
|
||||
$messenger->to($data['board_email1'], $data['admin_name']);
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($data['admin_name']),
|
||||
|
@ -899,7 +899,7 @@ switch ($mode)
|
||||
$notify_type = NOTIFY_EMAIL;
|
||||
}
|
||||
|
||||
$messenger->anti_abuse_headers();
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'BOARD_CONTACT' => $config['board_contact'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user