Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Mass User DeleteMass User Delete
Previous
 
Next
New Post
2/24/2009 3:43 PM
 

Is there away to do a mass user delete in DNN212?

We would like to delete all users in a site that we have for development purposes but dont want to take the time to delete them 1 by 1.

Any help is appreciated.

Thanks,

JMW

 
New Post
2/25/2009 3:27 PM
 

i don't know of any free ones, but http://www.phdobson.com/dnn/Default.aspx?tabid=58 seems to be fit for purpose and will work in 2.12 (which is very old)


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/25/2009 5:03 PM
 

John,

let me start out by saying that what I am about so suggest is something that should be tested extensively before doing this for real.  You indicated that you are cleaning up a development database but keep in mind a development database is "production" for the developers .

I have done this in the past but do so at your own discretion (and risk).  Basically, what I did was set the "Authorized" field in the database to false using a SQL script (see below) and then used the "delete all unathorized users" feature found on the user admin screen.  This script was for an older DNN 4.3.4 database which is why I suggesting testing it somewhere first.  Anyway... the script if fairly simple.

UPDATE userportals
SET    authorised = false
WHERE  userid NOT IN (SELECT userid
                      FROM   userroles
                      WHERE  roleid = 0)

Note that the subselect returns any users that are assigned the "Administrators" role (SuperUsers) are not in the "UserPortals" table.  The default roleid for Administrators is 0, you probably want to check that in your specific instance. The subselect is used to exclude (where userid not in...) administrator accounts because typically that account would still be used even for a development portal.

The main logic (UPDATE UserPortals...) sets the "Authorised" field = "false" for all other users.  Now you can go to the "Admin > User Accounts" tab and click the "Unauthorized" filter link and you should see all your user accounts.  If what you see is what you want click on "Delete Unauthorized Users" link and if no errors are encountered you are done.

Good luck and I hope this helps.

Chuck

 
New Post
2/25/2009 5:05 PM
 

John, I just noticed that you mentioned DNN 2.1.2.  Sorry, I missed that.  Anyway, this post may still be applicable.  I never used 212

Chuck

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Mass User DeleteMass User Delete


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out