I have lot of spam users on my site, I have blocked them all. To clean up now I want to delete all the blocked users. I thought that I will run a Php script to loop through all the users and if the users status is blocked then cancel the user accounts to make my database smaller. Looked up API and found the following function,
user_cancel($edit, $uid, $method)

But am not able to understand what needs to be passed in the $edit and $method field.

Could someone help me with this, or suggest me easier way to cancel user accounts of all the blocked users.
Thanks
--
Goli

Comments

nevets’s picture

It is generally a better practice to keep the block users as it keeps them from re-registering with the same email address.

Goli’s picture

Hi nevets
Thanks for the reply. But would it not increase the size of my database. Currently my dababase has become really huge,because there are lot of spam users.

Goli