mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/8323] Do not allow sending of Private Messages to users who are banned
PHPBB3-8323
This commit is contained in:
parent
c53d7f0b62
commit
c38bb4254a
2 changed files with 18 additions and 0 deletions
|
@ -1265,6 +1265,23 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
|
||||||
$error[] = $user->lang['PM_USERS_REMOVED_NO_PERMISSION'];
|
$error[] = $user->lang['PM_USERS_REMOVED_NO_PERMISSION'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if users have permission to read PMs
|
||||||
|
// Only check if not a moderator or admin, since they are allowed to override this user setting
|
||||||
|
if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
|
||||||
|
{
|
||||||
|
$banned_user_list = phpbb_get_banned_user_ids(array_keys($address_list['u']));
|
||||||
|
|
||||||
|
if (!empty($banned_user_list))
|
||||||
|
{
|
||||||
|
foreach ($banned_user_list as $banned_user)
|
||||||
|
{
|
||||||
|
unset($address_list['u'][$banned_user]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$error[] = $user->lang['PM_USERS_REMOVED_BANNED'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -367,6 +367,7 @@ $lang = array_merge($lang, array(
|
||||||
'PM_SENTBOX' => 'Sent messages',
|
'PM_SENTBOX' => 'Sent messages',
|
||||||
'PM_SUBJECT' => 'Message subject',
|
'PM_SUBJECT' => 'Message subject',
|
||||||
'PM_TO' => 'Send to',
|
'PM_TO' => 'Send to',
|
||||||
|
'PM_USERS_REMOVED_BANNED' => 'Some users couldn’t be added as they are banned.',
|
||||||
'PM_USERS_REMOVED_NO_PERMISSION' => 'Some users couldn’t be added as they do not have permission to read private messages.',
|
'PM_USERS_REMOVED_NO_PERMISSION' => 'Some users couldn’t be added as they do not have permission to read private messages.',
|
||||||
'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.',
|
'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.',
|
||||||
'POPUP_ON_PM' => 'Pop up window on new private message',
|
'POPUP_ON_PM' => 'Pop up window on new private message',
|
||||||
|
|
Loading…
Add table
Reference in a new issue