Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • TikTakToe 60 posts 102 karma points
    Jun 08, 2015 @ 11:35
    TikTakToe
    1

    Deleting Users - up for discussion, my take so far, please pitch in!

    Long story, but i need to clean out a number of backend users - cant do this in the dashboard, disabling is not really an option, so need to delve into the database - without a good schema available, it's a bit of a detective story.

    My sql script so far (based initially from a previous post on the subject (https://our.umbraco.org/member/28956):

    -- step 1, reassign all content back to main user
    
    UPDATE umbracoNode SET nodeUser = 0 WHERE nodeUser > 0
    UPDATE cmsDocument SET documentUser = 0 WHERE documentUser > 0
    update cmsTask set parentUserId=0 where parentUserId > 0
    update cmsTask set userId = 0 where userId > 0
    
    -- step 2, clear down the other users
    
    DELETE FROM umbracoLog WHERE userId > 0
    DELETE FROM umbracoUser2App WHERE [user] > 0
    DELETE FROM umbracoUser2NodeNotify WHERE userId > 0
    DELETE FROM umbracoUser2NodePermission WHERE userId > 0
    DELETE FROM umbracoUserLogins WHERE userID > 0
    DELETE FROM umbracoUser WHERE id > 0
    

    So that's my starter for 10 - I'm a bit unclear about the cmsTask table (only seen it used for tranaslations), so would be interesting to find out more about that.

    Also, if anyone knows/has an Umbraco 7+ schema?

    thanks

    Ian

  • Jon Frederiksen 52 posts 111 karma points
    Sep 08, 2021 @ 16:17
    Jon Frederiksen
    0

    Oh, thank you for this 6 yrs old post. It saved my day trying to solve an odd issue with a 7.15 Umraco installation.

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft