We prepared this document for instructions to setup for a hook call when users cancelled their accounts.

/** 
* Action to take when user cancelled their account 
* 
* @param int $iUser 
*/ 
public function onDeleteUser($iUser) 
{ 
    // delete todo tasks 
    $aTodoTasks = $this->database() 
        ->select('album_id') 
        ->from(Phpfox::getT('todolist_task')) 
        ->where('user_id = ' . (int)$iUser) 
        ->execute('getSlaveRows'); 
    foreach ($aTodoTasks as $aTodoTask) { 
        \Phpfox::getService('todo.process')->delete($aTodoTask['task_id']); 
    } 
}