php script for usergroup promotion = users gets banned !!!
The cron jobs stopped working since a long time on my vbulletin 3.6.4 forum for an unknown reason, so i wrote my own script to promote the users to specific usergroups depending on their post number
Quote:
<?php
include("../db.php");
$current = time();
$unmois = 2629743;
$abc = $current - $unmois;
// membres actifs
$query = "UPDATE vb_user SET usergroupid=9 WHERE posts BETWEEN 14 AND 150 AND usergroupid != 8";
$res = mysql_query($query) or die(mysql_error());
// comit? autogestion
$query = "UPDATE vb_user SET usergroupid=13 WHERE posts > 99 AND joindate < $abc AND usergroupid != 8";
$res = mysql_query($query) or die(mysql_error());
?>
Problem is that all the users gets banned after being promoted !!!
So:
1) What's wrong with my script and why does the users gets banned ?
2) How can i unban all users that were banned for no reason ?
- In ModCP it doesn't show any information about the bans : ban date not available, "banned by" not available, lift date not available
- In vb_userban table, only the users banned by my moderators are shown. The users that got banned automatically after being promoted by my php script are NOT displayed in this table.
--------------- Added [DATE]1377018829[/DATE] at [TIME]1377018829[/TIME] ---------------
Apparently lots of my users are saying that they are on the banlist but they can still post on the forum so i'm not sure what's happenning...
Anyway, how can i promote users to a new group through a php script without putting the users on the banlist ?