this doesn't work in vb3.7.0 RC2, so I've modified the script provided above
i don't program in php, but it didn't seem hard to modify
Code:
<?php
require_once('./global.php');
require_once('./includes/functions.php');
$perpage = 100;
$start = intval($_REQUEST[start]);
echo "Resetting up to $perpage passwords starting at user id $start, please stand by!<br />";
$res = $vbulletin->db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user ORDER BY userid DESC LIMIT 1");
$maxuid = $res[userid];
$users = $vbulletin->db->query("SELECT userid,username,salt,email FROM " . TABLE_PREFIX . "user WHERE userid > $start ORDER BY userid ASC LIMIT $perpage");
vbmail_start();
while ($userinfo = $vbulletin->db->fetch_array($users)) {
$vbulletin->db->query("DELETE FROM " . TABLE_PREFIX . "useractivation WHERE userid = $userinfo[userid] AND type = 1");
$newpassword = vbrand(0, 100000000);
$vbulletin->db->query("UPDATE " . TABLE_PREFIX . "user SET password = '" . addslashes(md5(md5($newpassword) . $userinfo['salt'])) . "', passworddate = NOW() WHERE userid = $userinfo[userid]");
eval(fetch_email_phrases('resetpw', $userinfo['languageid']));
vbmail($userinfo['email'], $subject, $message, true);
echo "Reset UserID:";
echo $userinfo[userid];
echo "<br />";
flush();
$lastuid = $userinfo[userid];
}
vbmail_end();
if ($lastuid < $maxuid) {
$start=$lastuid;
$vbulletin->url = "resetpw.php?" . $vbulletin->session->vars['sessionurl'] . "start=$start";
eval(print_standard_redirect('Going for another $perpage Password-Resets', 0));
} else {
echo "Finished!";
}
?>