PDA

View Full Version : Prune users - More options wanted


Snowhog
07-14-2013, 06:45 PM
vBulletin 4.2.1

I'm looking for a MOD that provides for more search options in Prune / Move Users in the Admin CP. The default options don't allow enough finesse.

henrykk
10-01-2013, 12:30 AM
I second this request.

I would like to see searches by:
-email or part email
-ip address or part ip

I have to say, I find it very odd that these are missing from the prune area

mainframe
03-23-2020, 02:08 PM
in admincp/user.php make the following changes for searching on (partial)email


if ($_REQUEST['do'] == 'pruneusers')
{
$vbulletin->input->clean_array_gpc('r', array(
'usergroupid' => TYPE_INT,
'daysprune' => TYPE_INT,
'minposts' => TYPE_INT,
'joindate' => TYPE_ARRAY_UINT,
'email' => TYPE_STR, // << ADD THIS LINE
'order' => TYPE_STR
));


SEARCH FOR:

if ($vbulletin->GPC['minposts'])
{
$sqlconds .= iif(empty($sqlconds), 'WHERE', 'AND') . " posts < " . $vbulletin->GPC['minposts'] . ' ';
}


ADD BELOW:

if ($vbulletin->GPC['email'])
{
$sqlconds .= iif(empty($sqlconds), 'WHERE', 'AND') . " email LIKE '%" . $vbulletin->GPC['email'] . "%' ";
}


SEARCH FOR:

print_input_row($vbphrase['posts_is_less_than'], 'minposts', iif($vbulletin->GPC['minposts'], $vbulletin->GPC['minposts'], '0'));


ADD BELOW:

print_input_row($vbphrase['email'], 'email', '');