Forum


HomeHomePublicPublicAdministrationAdministrationDNN 9 "Remove Deleted Users" gone?DNN 9 "Remove Deleted Users" gone?
Previous
 
Next
New Post
10/26/2017 11:53 PM
 

Hi Aderson

I have identifed a block of 40k spam registrations and set the IsDeleted=1 in the UserPortals table.

I thought I would be able to use the "Remove Deleted Users" function but it seems to be no longer available.

Any clues?

Thanks ever so much

Richard

 
New Post
10/27/2017 12:56 AM
 

Hi Richard

Had a similar problem with one of my sites. Actually DNN 6.2.2 (won't be for much longer)

I used SQL (via Access - but you can use SQL Management Studio or the SQL feature under Host) to set the users to Unauthorised and then use the in built feature in DNN to remove Unauthorised Users.

My personal opinion, is DNN is like Social Media - default is "Open". I now have a default policy to disable Registration as the first function when I build a site.

I had added a new portal to the platform and registration was open, we had a large number of "registrations" and they some how managed to hack the site files targeting a few HTML files and injecting some code (b******s)

My recommendation, unless you actually need people to register disable it, or use authorised registration. Check your site for any HTML files. DNN is database driven so really you should not have any HTML files. The ones I found actually related to a clickable map (no longer used) and also instructions dropped when 3rd party modules are added to the site.

If you do need to have users register, if it doesn't need to be immediate I would be inclined to use a "contact form" to get there request and then use a 3rd Party module to bulk add the users.

NOTE: If DNN 9 has removed the Delete Users / Delete Unauthorised and you delete them yourself with SQL also be aware there are Users and ASPNet_Users

Hope this Helps

If you are not familiar with SQL let me know and I'll post sample SQL Queries

 

Regards

 

Dave

 
New Post
10/27/2017 1:25 AM
 

Thanks for your reply.

However I have happily found that I no longer get Spam registrations since upgrading to DNN9.

My problem is that the bulk "Remove Deleted Users" link is not visible to be in DNN 9, I just can't see the option we had in earlier versions on the Users screen.

 
New Post
10/27/2017 1:34 AM
 

According to this page the 'Add user' button should be a split button with the options I am after in the dropdown.

However my Add User button is not a split button just a normal button.

https://dnntracker.atlassian.net/brow...

 
New Post
10/28/2017 4:00 AM
 

Hi Richard,

I would set the IsDeleted in the Users table and then I would run the following script delete by delete separately:

  • DELETE UserRoles WHERE UserID IN (SELECT UserID FROM Users WHERE IsDeleted=1)
  • DELETE UserPortals WHERE UserID IN (SELECT UserID FROM Users WHERE IsDeleted=1)
  • DELETE userprofile WHERE UserID IN (SELECT UserID FROM Users WHERE IsDeleted=1)
  • DELETE aspnet_membership WHERE UserId IN (SELECT UserId FROM aspnet_users WHERE UserName IN (SELECT UserName FROM Users WHERE IsDeleted=1))
  • DELETE aspnet_users WHERE UserName IN (SELECT UserName FROM Users WHERE IsDeleted=1)
  • DELETE Users WHERE IsDeleted=1

IMPORTANT: You MUST back p your database before using this as I have not tested this version of this script but I have used a very similar version many time in the past.

BTW, I take no responsibility for side effects if you apply this - :) - Sorry I had to add this disclaimer.

Cheers,

Aderson

 
Previous
 
Next
HomeHomePublicPublicAdministrationAdministrationDNN 9 "Remove Deleted Users" gone?DNN 9 "Remove Deleted Users" gone?



Try FREE
30 days money back guaranteed