I'm still trying to get some sort of callback or hook going so that when I delete a FE member FROM THE BACKEND, another module will be purged of related data.
I've given up on the closeAccount hook, as this only works with a members self-deletion using the FE closeAccount module.
So now I'm trying to add an ondelete_callback to tl_member.php from myModule, but I can't get that to work either.
Can anyone see the reason why this doesn't work?
In myModule/dca/tl_member.php
In myModule/dca/tl_joblistings_members.phpCode://add an ondelete_callback to the tl_member module $GLOBALS['TL_DCA']['tl_member']['config']['ondelete_callback'] = array('tl_joblistings_members', 'resetAfterMemberDelete');
Code:class tl_joblistings_members extends Backend { public function resetAfterMemberDelete(Datacontainer $dc) { $thememberno = "callback worked"; $this->Database->prepare("UPDATE tl_joblistings_members SET company =? WHERE memberno =115") ->limit(1) ->execute($thememberno); } }


Reply With Quote
Bookmarks