Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

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

  • Add new callback function to file "Callback.php". 
  • Example
/** 
* 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']); 
    } 
}
  • No labels