WebsiteFavorites Plugin - Delete users favorites in db

2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 11, 2015   (RSS)

By gregThomas - May 11, 2015

Hi Tom,

You could do this by adding the following code when you delete a user's account:

if($userNum){
  mysql_delete($GLOBALS['WSF_TABLENAME'], null, "`createdByUserNum` = '$userNum'");
}

You'd need to set the variable $userNum to the account number of the user who's being deleted.

As this will be deleting records from the database, ensure that you backup your database before you test it with your site.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com