[horde] Script/tool to wipe all a user's events/tasks from Horde?

Michael Rubinsky mrubinsk at horde.org
Wed Apr 1 19:20:41 UTC 2009


Quoting Robert McAuley <rmcauley at ca.afilias.info>:

> Hello, list.
>
> I don't know really how, but one of my users managed to add over  
> 3,000 tasks to his tasklist with Funambol/Outlook.  Horde is now  
> completely unusable for him.

Wow, busy guy ;)

>
> We're using an LDAP tree for authentication, so we can't simply  
> delete his user account using the administrative tools in Horde, but  
> I was wondering if there's another way to wipe all his data out of  
> Horde short of doing it directly in the database.  (he can't login  
> at the moment to fix it, since he has inline notifications on, and  
> all 3,000 tasks are trying to alert him. we've tried using Funambol  
> to 'blank' his task list to no effect)
>
> Anyone out there have any tips for wiping a user's data the hard  
> way, or should I simply delete everything with his username on it in  
> the nag_tasks and kronolith_events tables?

If it was only tasks that were added, you shouldn't need to touch the  
kronolith table. Nuking the tasks from nag_tasks should be sufficient,  
but the creation of those tasks were probably logged in the history  
table as well. Not sure off hand how that would affect any syncing. If  
you want to delete *all* of his current task lists, The Right Way (tm)  
would be to write a script to delete the tasks via the API, the same  
way that horde does it when deleting a user. You should be able to  
call _nag_removeUserData() and just pass it the username. If you want  
to cherry pick the tasks to remove, you'd probably be better off doing  
it via direct SQL manipulation.


Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin


More information about the horde mailing list