/* Remove all events owned by the user in all calendars. */
$result = Kronolith::getDriver()->removeUserData($user);
- /* Now delete history as well. */
- $GLOBALS['injector']->getInstance('Horde_History')->removeByParent('kronolith:' . $user);
-
/* Get the user's default share */
try {
$share = $GLOBALS['kronolith_shares']->getShare($user);
}
}
- /* Now delete history as well. */
- $history = $GLOBALS['injector']->getInstance('Horde_History');
- if (method_exists($history, 'removeByParent')) {
- $histories = $history->removeByParent('mnemo:' . $user);
- } else {
- /* Remove entries 100 at a time. */
- $all = $history->getByTimestamp('>', 0, array(), 'mnemo:' . $user);
- if (is_a($all, 'PEAR_Error')) {
- Horde::logMessage($all, 'ERR');
- } else {
- $all = array_keys($all);
- while (count($d = array_splice($all, 0, 100)) > 0) {
- $history->removebyNames($d);
- }
- }
- }
-
/* Remove the share itself */
if (!empty($share)) {
$result = $GLOBALS['mnemo_shares']->removeShare($share);
}
}
- /* Now delete history as well. */
- $GLOBALS['injector']->getInstance('Horde_History')->removeByParent('nag:' . $user);
-
/* ...and finally, delete the actual share */
if (!empty($share)) {
$result = $GLOBALS['nag_shares']->removeShare($share);