Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
php
php
/** 
* 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']); 
    } 
}