![]() |
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) 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 |
take a look at the user dm class ill get back to you about this in one sec i just need to find a hack file.
PHP Code:
|
Hi,
Thanks for the quick response. I have modified my code so that it matches the your example but I am still getting the same error: Fatal error: Existing data passed is not an array Called set_existing in /usr/local/apache/htdocs/forums/deleteVBUser.php on line 23 in /includes/class_dm.php on line 235 Can the delete method be called in the manner which I am trying? Or Is it because I am using the function fetch_userinfo to set the existing contents of a user data manager? Thanks Hi I think the error I am getting relates to the following code, which can be found in includes/class_dm_user.php (line 1795): Code:
$admindm =& datamanager_init('Admin', $this->registry, ERRTYPE_SILENT); In the above code it seems to initiate a admin datamanager and then tries to delete it, is this right? I am trying to delete users who may not have logged into the forums, is this possible? Or can you only delete users who have logged in? Thanks |
you might need to add this in require_once(DIR . '/includes/adminfunctions.php');
|
Hi,
Again thanks for the quick response! added the following include : require_once(DIR . '/includes/adminfunctions.php'); But I still get the same error. The really strange thing is that it deletes the user but still displays the error message. As I said in my previous post it seems initialise an admin datamanager, I dont understand why it does this!? Thanks |
i just found this // Do the account deletion
$info = fetch_userinfo($vbulletin->GPC['userid']); also use unset($userdm); after the first code i gave you |
Hi,
Nope that didnt work still get the same error message! Regarding the code that you listed in your last post am I correct in assuming that it would only delete the user account of the user who is currently logged in? Basically I need my script to be able to delete any user based on the username that is supplied to the script (via POST/CURL), is this even possible? Like I said it seems to work but I still get the annoying error message! Thanks |
Remove please!
|
Ever find the solution for this?
|
All times are GMT. The time now is 10:38 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|