The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Deleting Users via the Data manager
Hi,
I am trying to delete VB user via one of my php scripts, using the following code: Code:
function qpc_post($varname) { return trim(stripslashes((get_magic_quotes_gpc()) ? $_POST[$varname] : addslashes($_POST[$varname]))); } require_once('./global.php'); require_once('./includes/class_dm.php'); require_once('./includes/class_dm_user.php'); /* get user id of specifed username */ $array = $db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username='" . qpc_post('username') . "'"); $userdm = new vB_DataManager_User($vbulletin, ERRTYPE_ARRAY); $userdm->set_existing(fetch_userinfo($array['userid'])); $userdm->delete(); Then to delete the user I simply call the delete() method. This code deletes the user as when i check in the admin cp the user account has gone however I still get the following error (deleteVBUser.php my php script): Fatal error: Existing data passed is not an array Called set_existing in /usr/local/apache/htdocs/forums/deleteVBUser.php on line 22 in /includes/class_dm.php on line 235 Any ideas on what this means? Am I doing something wrong? Your help would be much appreciated. Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|