-
- 34 Posts
Hello!
I've created a custom table with custom fields. If I delete a WebUser in WebloginPE, then it will delete only the line in the WebUser table. The custom table remains the line. How can I delete the corresponding row in the custom table automatically?
-
- 788 Posts
You should be able to create a new plugin that fires on the "OnWebDeleteUser" event.
You'll have access to the following variables in your plugin:
$internalKey == users id
$username == users username
$timestamp
plugin code:
$table ='YOUR_TABLE_NAME';
$delete = $modx->db->delete($tablename, 'username="'.$username.'"');
modify the WHERE section above ('username="username"') to fit your custom table.
-
- 388 Posts
Hello, witch one works? i have the same problem?
Thank you!
--
ysanmiguel.com