Forum .LRN Q&A: Unable to nuke a user

Collapse
Posted by Janine Ohmer on
I'm trying to nuke a user I just created and it is failing due to the two content folders dotLRN creates for each new user.  I tried using content_folder.delete to remove one of them but it isn't empty.  Does anyone know the magic incanations needed to find all the relevant objects and delete them?  I know I can figure it out but it always takes me a long time to make my way through this stuff and today I don't have the time to spare.  Thanks in advance!
Collapse
Posted by Janine Ohmer on
Ok, I got it to work like so:

SQL> select object_id from acs_objects where creation_user = 20723;

OBJECT_ID
----------
    20797
    20798

SQL> begin
  2  content_folder.delete(20798);
  3  content_folder.delete(20797);
  4  acs.remove_user(20723);
  5  end;
  6  /

(the key being to do the folders in reverse order).  More than a bit klunky, but maybe this will help someone.