1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-13 20:32:11 +02:00

[ticket/15237] Fix unguarded includes to functions_user

https://tracker.phpbb.com/browse/PHPBB3-15237

PHPBB3-15237
This commit is contained in:
RMcGirr83 2017-05-24 12:58:25 -04:00
parent 03c30d4bc6
commit 7a3e55bdb3
5 changed files with 20 additions and 5 deletions

View File

@ -28,7 +28,10 @@ class mcp_ban
global $db, $user, $auth, $template, $request, $phpbb_dispatcher;
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
if (!function_exists('user_ban'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
// Include the admin banning interface...
include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);

View File

@ -53,7 +53,10 @@ function mcp_post_details($id, $mode, $action)
if ($auth->acl_get('m_info', $post_info['forum_id']))
{
$ip = request_var('ip', '');
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
if (!function_exists('user_ipwhois'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
$template->assign_vars(array(
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id") . '">', '</a>'),

View File

@ -101,7 +101,10 @@ switch ($mode)
{
case 'team':
// Display a listing of board admins, moderators
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
if (!function_exists('user_get_id_name'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
$page_title = $user->lang['THE_TEAM'];
$template_html = 'memberlist_team.html';

View File

@ -1066,7 +1066,10 @@ if ($submit || $preview || $refresh)
// Validate username
if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS && $post_data['username'] && $post_data['post_username'] && $post_data['post_username'] != $post_data['username']))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
if (!function_exists('validate_username'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
$user->add_lang('ucp');

View File

@ -60,7 +60,10 @@ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC
// Whois requested
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
if (!function_exists('user_get_id_name'))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
$sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s