I received a subpoena for a few member's PMs but do not know how to find them in the database.
Is there a clear text file or table for PMs or are they encrypted?
Is there a clear text file or table for PMs or are they encrypted?
vBulletin 3 is end of life and will not be receiving future development. Warning: vBulletin 3.8.11 is not compatible with PHP 7.2.0 or higher.
Welcome to the vBulletin support forums! In our community forums you can receive professional support and assistance with any issues you might have with your vBulletin Products.
Useful Links for Guests:
If you are having problems posting in the relevant areas for your software, please see this topic.
$conn = mysql_connect( 'host', 'user', 'password' ) or die( mysql_error() );
mysql_select_db( 'dbname', $conn) or die( mysql_error() );
$useridName = array(
// list userid => username here
'1' => 'username1'
,'2' => 'username2'
,'3' => 'username3'
);
$userid = array_keys( $useridName );
// if you want to filter by date
$datefilter = ' and pmtext.dateline >= ' . mktime(0, 0, 0, 1, 1, 2011);
for($i=0, $j=count($userid); $i<$j ; $i++){
$sql = 'select count(*) as TotalPM from pmtext where pmtext.fromuserid = \'' . intval($userid[$i]) . '\'';
$sql .= $datefilter;
$result = mysql_query( $sql, $conn ) or die( mysql_error());
if($row = mysql_fetch_assoc($result)){
print($userid[$i] . "\t: " . $useridName[$userid[$i]] . "\t: " . $row['TotalPM'] . "\n");
}
#print $sql . "\n";
}
$columnList = '';
$columnList .= 'pmtext.fromuserid';
$columnList .= ', pmtext.fromusername';
$columnList .= ', pmtext.title';
$columnList .= ', pmtext.message';
$columnList .= ', FROM_UNIXTIME( pmtext.dateline ) as dateline';
$sqlAll = 'select ' . $columnList . ' ';
$sqlAll .= 'from pmtext where ';
$sqlAll .= 'pmtext.fromuserid in ( ';
$sqlAll .= implode( ',', $userid );
$sqlAll .= ' ) ';
$sqlAll .= $datefilter;
echo $sqlAll;
echo "\n";
mysql_close( $conn );
exit();
Comment