[2.0.21] User Shield

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
52
79%
Very Good
8
12%
Good
4
6%
Fair
1
2%
Poor
1
2%
 
Total votes: 66

aosfyc
Registered User
Posts: 58
Joined: Tue Jul 19, 2005 6:21 pm

Re: [2.0.21] User Shield

Post by aosfyc »

I have been running this mod for the past year or so (or more) but just yesterday, all of a sudden, I started getting the following error when I was trying to "Delete Selected" users from the member list.
General Error

Could not delete group for this user

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

DELETE FROM groups WHERE group_id =

Line : 427
File : memberlist.php
Any help in resolving/troubleshooting this error would be greatly appreciated. Thanks!
User avatar
RMcGirr83
Former Team Member
Posts: 22011
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.21] User Shield

Post by RMcGirr83 »

Post up your memberlist.php file using the bbcode [ code] tags and I'll take a look at it for you.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aosfyc
Registered User
Posts: 58
Joined: Tue Jul 19, 2005 6:21 pm

Re: [2.0.21] User Shield

Post by aosfyc »

Thanks for your help. Here is the code:
<?php
/***************************************************************************
* memberlist.php
* -------------------
* begin : Friday, May 11, 2001
* copyright : (C) 2001 The phpBB Group
* email : [email protected]
*
* $Id: memberlist.php,v 1.36.2.13 2006/12/16 13:11:24 acydburn Exp $
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//

// User Stealth mod - start
if ($board_config['username_hide_inac'] && $userdata['user_id'] == ANONYMOUS)
{
redirect(append_sid("login.$phpEx?redirect=memberlist.$phpEx", true));
}

$select_inactive = (!empty($HTTP_POST_VARS['select_inactive'])) ? intval($HTTP_POST_VARS['select_inactive']) : 0;
$activate_inactive = (isset($HTTP_POST_VARS['activate_inactive'])) ? TRUE : 0;
$delete_inactive = (isset($HTTP_POST_VARS['delete_inactive'])) ? TRUE : 0;

$nav_confirm = "<br /><br />" . sprintf($lang['Click_return_memberlist'], "<a href=\"" . append_sid("memberlist.$phpEx?mode=inactive") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
// User Stealth mod - end

$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
$start = ($start < 0) ? 0 : $start;

if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']);
}
else
{
$mode = 'joined';
}

if(isset($HTTP_POST_VARS['order']))
{
$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else if(isset($HTTP_GET_VARS['order']))
{
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else
{
$sort_order = 'ASC';
}

//
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Interests'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN ) ? $lang['Sort_Inactive'] : $lang['Sort_Top_Ten'] : $lang['Sort_Top_Ten'],); // User Stealth mod - added "inactive" chained ternary operator
$mode_types = array('joined', 'username', 'interests', 'posts', 'email', 'website', ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN ) ? 'inactive' : 'topten' : 'topten',); // User Stealth mod - added "inactive" chained ternary operator

$select_sort_mode = '<select name="mode">';
for($i = 0; $i < count($mode_types_text); $i++)
{
$selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : '';
$select_sort_mode .= '<option value="' . $mode_types[$i] . '"' . $selected . '>' . $mode_types_text[$i] . '</option>';
}
$select_sort_mode .= '</select>';

$select_sort_order = '<select name="order">';
if($sort_order == 'ASC')
{
$select_sort_order .= '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>';
}
else
{
$select_sort_order .= '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>';
}
$select_sort_order .= '</select>';

// User Stealth mod - start
if ($board_config['username_hide_inac'] && $userdata['user_level'] == ADMIN)
{
$fetched_rows = get_db_stat('inactive_total');
}
// User Stealth mod - end
//
// Generate page
//
$page_title = $lang['Memberlist'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => 'memberlist_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);

$template->assign_vars(array(
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_EMAIL' => $lang['Email'],
'L_WEBSITE' => $lang['Website'],
'L_ORDER' => $lang['Order'],
'L_SORT' => $lang['Sort'],
'L_SUBMIT' => $lang['Sort'],
'L_AIM' => $lang['AIM'],
'L_YIM' => $lang['YIM'],
'L_MSNM' => $lang['MSNM'],
'L_ICQ' => $lang['ICQ'],
// User Stealth mod - start
'L_JOINED' => ( $mode == 'inactive' && $fetched_rows != 0 ) ? '<span style="color:#efefef;">' . $lang['Joined'] . '</span>' : $lang['Joined'],
'L_NUM_OF_ROWS_RETURNED' => ($fetched_rows != 0) ? ($fetched_rows > 1) ? "<b>" . $fetched_rows . "</b>" . $lang['Rows_returned'] : "<b>" . $fetched_rows . "</b>" . $lang['Row_returned'] : '' ,
'L_SELECT_ALL' => ($fetched_rows > 1) ? $lang['Select_all'] : '',
'L_DIVIDER' => ($fetched_rows > 1) ? $lang['Divider'] : '',
'L_UNSELECT_ALL' => ($fetched_rows > 1) ? $lang['Unselect_all'] : '',

'ROW_NUMBER_TITLE' => ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN && $mode == 'inactive' && $fetched_rows > 0) ? $lang['Select'] : '#' : '#',
'ACTIVATE_INACTIVE' => ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN && $mode == 'inactive' && $fetched_rows > 0) ? '<input type="submit" name="activate_inactive" value="' . $lang['Activate'] . '" class="mainoption" />&nbsp;&nbsp;' : '&nbsp;' : '&nbsp;',
'DELETE_INACTIVE' => ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN && $mode == 'inactive' && $fetched_rows > 0) ? '<input type="submit" name="delete_inactive" value="' . $lang['Delete'] . '" class="mainoption" />' : '&nbsp;' : '&nbsp;',
// User Stealth mod - end
'L_POSTS' => $lang['Posts'],
'L_PM' => $lang['Private_Message'], 'L_INTERESTS' => $lang['Interests'],


'S_MODE_SELECT' => $select_sort_mode,
'S_ORDER_SELECT' => $select_sort_order,
'S_MODE_ACTION' => append_sid("memberlist.$phpEx"))
);

switch( $mode )
{
case 'joined':
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'interests':
$order_by = "user_interests $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
// User Stealth mod - start
case 'inactive':
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
$non_activated = 'AND user_active != 1';
break;
// User Stealth mod - end
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
}
// User Stealth mod - start
$hide_inactive_on = ( $board_config['username_hide_inac']) ? ( $userdata['user_level'] == ADMIN ) ? ( $mode == 'inactive') ? $non_activated : 'AND user_active >= 0' : 'AND user_active = 1' : 'AND user_active >= 0';
// User Stealth mod - end

// $sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
$hide_inactive_on
ORDER BY $order_by";
// User Stealth mod - added $hide_inactive_on above
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$username = $row['username'];
$user_id = $row['user_id'];

$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
$interests = ( !empty($row['user_interests']) ) ? $row['user_interests'] : '&nbsp;';
$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;

$poster_avatar = '';
if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
{
switch( $row['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}

if ( !empty($row['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $user_id) : 'mailto:' . $row['user_email'];

$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '&nbsp;';
$email = '&nbsp;';
}

$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';

$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id");
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';

if ( !empty($row['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}

$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';

$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';

$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';

$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $username) . '" title="' . sprintf($lang['Search_user_posts'], $username) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username) . '</a>';

$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

$template->assign_block_vars('memberrow', array(
// User Stealth mod - start
'S_SELECT_INACTIVE' => $row['user_id'], // Assign id to checkbox array
'ROW_NUMBER' => ( $board_config['username_hide_inac'] ) ? ( $userdata['user_level'] == ADMIN && $mode == 'inactive' ) ? '<input type="checkbox" name="select_inactive[]" value="' . $row['user_id'] . '" />' : $i + ( $start + 1 ) : $i + ( $start + 1 ),
// User Stealth mod - end
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
'FROM' => $from,
'JOINED' => $joined,
'POSTS' => $posts,
'INTERESTS' => $interests,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,

'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
);

$i++;
}
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
}

if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
{
$sql = "SELECT count(*) AS total
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . " $hide_inactive_on";
// User Stealth mod - added $hide_inactive_on above

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
}

if ( $total = $db->sql_fetchrow($result) )
{
$total_members = $total['total'];

$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). '&nbsp;';
}
$db->sql_freeresult($result);
}
else
{
$pagination = '&nbsp;';
$total_members = 10;
}

$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),

'L_GOTO_PAGE' => $lang['Goto_page'])
);

// User Stealth mod - start
if ($board_config['username_hide_inac'] && $userdata['user_level'] == ADMIN && $mode == 'inactive')
{
if ($fetched_rows != 0)
{
$template->assign_block_vars('full_tb', array());
}
else
{
$template->assign_block_vars('no_inactive', array(
'NO_DATA' => $lang['No_data'])
);
}

$total_inactives = intval(sizeof($HTTP_POST_VARS['select_inactive']));

for ($i=0; $i < $total_inactives; $i++) // Identify selected checboxes
{
$cb_ids .= intval($HTTP_POST_VARS['select_inactive'][$i]).',';
}

$cb_ids = rtrim($cb_ids,',');

if ($activate_inactive) // Activate inactive
{
if ($select_inactive)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_active = 1
WHERE user_id IN ( $cb_ids ) ";

if($db->sql_query($sql))
{
$message = ($total_inactives > 1) ? $lang['Inactive_selected_num'] . "<b>" . $total_inactives . "</b>&nbsp;" . $lang['Inactives_activated'] . $nav_confirm : $lang['Inactive_activated'] . $nav_confirm;
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die( GENERAL_ERROR, "Failed to update table", "", __LINE__, __FILE__, $sql );
}
}
else
{
$message = $lang['No_check_selected'] . $nav_confirm;
message_die(GENERAL_MESSAGE, $message);
}
}

if ($delete_inactive) // Delete inactive
{
if ($select_inactive)
{
$i = 0;
while( $i < $total_inactives )
{
$sql = "SELECT g.group_id
FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
WHERE ug.user_id IN ( $cb_ids )
AND g.group_id = ug.group_id
AND g.group_single_user = 1";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
}

$row = $db->sql_fetchrow($result);

$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $row['group_id'];

if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
}

$i++;
}

$sql = "DELETE
FROM " . USERS_TABLE . "
WHERE user_id IN ( $cb_ids ) ";

if(!$db->sql_query($sql))
{
message_die( GENERAL_ERROR, "Could not delete user from users table", "", __LINE__, __FILE__, $sql );
}

$sql = "DELETE
FROM " . USER_GROUP_TABLE . "
WHERE user_id IN ( $cb_ids ) ";

if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql);
}
else
{
$message = ($total_inactives > 1) ? $lang['Inactive_selected_num'] . "<b>" . $total_inactives . "</b>&nbsp;" . $lang['Inactives_deleted'] . $nav_confirm : $lang['Inactive_deleted'] . $nav_confirm;
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
$message = $lang['No_check_selected'] . $nav_confirm;
message_die(GENERAL_MESSAGE, $message);
}
}
}
// User Stealth mod - end

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
User avatar
RMcGirr83
Former Team Member
Posts: 22011
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.21] User Shield

Post by RMcGirr83 »

Hmmm, you can try this

FIND (on or about line 411)

Code: Select all

FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
replace with

Code: Select all

FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
Also, to try and narrow it down a tad, if that doesn't work take the following

Code: Select all

var_dump($row)
and place it directly after this in memberlist.php

Code: Select all

				if( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
				}

				$row = $db->sql_fetchrow($result);
Then try to delete the user again. Purpose of the var_dump is to see if any information is being pulled from the sql that is done when you select an inactive user to delete.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
aosfyc
Registered User
Posts: 58
Joined: Tue Jul 19, 2005 6:21 pm

Re: [2.0.21] User Shield

Post by aosfyc »

I tried this, but ran into a problem.

In my file, the line I have is:
if ( $row = $db->sql_fetchrow($result) )
Note the ")" at the end of the line instead of a ";". I am very much a beginner in PHP so I am not sure what the implications are on this. However, when I made the change suggestion by adding the "var_dump($row)" I got an error when trying to access the memberlist.php page.

Thank you.
User avatar
RMcGirr83
Former Team Member
Posts: 22011
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [2.0.21] User Shield

Post by RMcGirr83 »

Sorry, it should be

Code: Select all

var_dump($row);
and place it on a new line after

Code: Select all

if ( $row = $db->sql_fetchrow($result) )
{
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Post Reply

Return to “[2.0.x] MOD Database Releases”