Today I had to take the back-up off a live site and restore it on the staging server. However I had to remove all Umbraco members and thought it‘d be easier to do that with SQL script than API.
Despite Googling to find a firm solution (SQL script), I couldn‘t find one, so I decided to share this code in case anyone else wanted to delete all Umbraco members with SQL script rather than API.
This what I have come up with so far, and it seems to have removed all the members, but please leave a comment if you think there is a better way of doing this, or if any other data needs to be removed from any other table.
1 2 3 4 5 6 7 8 9 10 11 |
|