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:

  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.



Greg Thomas

PHP Programmer -