Copied to clipboard

Flag this post as spam?

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


  • Shaun 248 posts 475 karma points
    Jun 16, 2010 @ 16:18
    Shaun
    0

    Deleting members via SQL

    Hi All

    I have an installation with a lot of members that I want to cull.

    There are too many to do it in the admin, so I want to use a sql query to delete members according to particular criteria.

    I thought I should ask tho, will I need to do anything else in umbraco in order for these deletes to take effect. I ask as once I ran some sql to amend some doctype data, and I had to republish each item of the doctype by hand before the changes filtered through.

    Many thanks

    Shaun

     

  • Rich Green 2246 posts 4008 karma points
    Jun 16, 2010 @ 16:24
  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 16, 2010 @ 16:26
    Sebastiaan Janssen
    1

    Members don't require a publish anyway, so that won't be a problem.

    However, I'd still write a simple usercontrol that calls the Umbraco API to delete members, that way you can ensure your data's integrity. Once you delete through the API, you know that all of the properties (and maybe other related data) also get deleted.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jun 16, 2010 @ 16:46
    Richard Soeteman
    3

    HI I wouldn't delete Members using sql. A member has many relations with the UmbracoNode Table etc. Best to loop through the members and delete them if they match your criteria.

    Cheers,

    Richard

  • Shaun 248 posts 475 karma points
    Jun 16, 2010 @ 16:50
    Shaun
    0

    Thanks all. I'll write something using the api to do it then.

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 16, 2010 @ 17:04
    Sebastiaan Janssen
    0

    Shaun: The FALM Housekeeping module looks like it would do the job though!

  • Shaun 248 posts 475 karma points
    Jun 16, 2010 @ 19:14
    Shaun
    0

    hmm, from the screenshots and text it looks like it's more for users rather than members, is that right? Its members I want to zap unfortunately.

  • Rich Green 2246 posts 4008 karma points
    Jun 17, 2010 @ 09:28
    Rich Green
    0

    You're right Shaun, I misread your post.

    Best of luck, Rich

Please Sign in or register to post replies

Write your reply to:

Draft