mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
Merge pull request #3935 from Zoddo/ticket/10343
[ticket/10343] Allows a_user to show inactive accounts in memberlist * Zoddo/ticket/10343: [ticket/10343] Add a distinction for inactive users on memberlist [ticket/10343] Allows a_user to show inactive accounts in memberlist
This commit is contained in:
@@ -151,7 +151,7 @@ switch ($mode)
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id',
|
||||
'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_type, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id',
|
||||
|
||||
'FROM' => array(
|
||||
USER_GROUP_TABLE => 'ug',
|
||||
@@ -314,6 +314,8 @@ switch ($mode)
|
||||
'RANK_IMG' => $user_rank_data['img'],
|
||||
'RANK_IMG_SRC' => $user_rank_data['img_src'],
|
||||
|
||||
'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,
|
||||
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
@@ -1388,13 +1390,19 @@ switch ($mode)
|
||||
);
|
||||
}
|
||||
|
||||
$user_types = array(USER_NORMAL, USER_FOUNDER);
|
||||
if ($auth->acl_get('a_user'))
|
||||
{
|
||||
$user_types[] = USER_INACTIVE;
|
||||
}
|
||||
|
||||
$start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']);
|
||||
|
||||
// Get us some users :D
|
||||
$sql = "SELECT u.user_id
|
||||
FROM " . USERS_TABLE . " u
|
||||
$sql_from
|
||||
WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
|
||||
WHERE " . $db->sql_in_set('u.user_type', $user_types) . "
|
||||
$sql_where
|
||||
ORDER BY $order_by";
|
||||
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
|
||||
@@ -1509,6 +1517,7 @@ switch ($mode)
|
||||
|
||||
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
|
||||
'S_GROUP_LEADER' => $is_leader,
|
||||
'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,
|
||||
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $row['username']),
|
||||
));
|
||||
|
Reference in New Issue
Block a user