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 ...Bulk Delete UsersBulk Delete Users
Previous
 
Next
New Post
7/9/2011 6:39 AM
 
Hard deleting a user in DNN is somewhat difficult - you cant do it with a simple SQL DELETE
 - there are about 8 different referential integrity checks that need to be parsed to succeed.

Last time i needed to do this - i build a small custom module to do the task.

Westa
 
New Post
7/9/2011 2:24 PM
 
@Mike: I am still not sure which version are you on 5.6.2 or above. 5.6.2 has a feature where one can hard delete a user. If you are on 5.6.2, what you did should have worked, unless you have modules that have put hard referential integrity constraints on Users table. One way to check which modules have Foreign Key Constraints on Users table to run this query, which I obtained from http://blog.sqlauthority.com/2007/09/16/sql-server-2005-list-all-the-constraint-of-database-find-primary-key-and-foreign-key-constraint-in-database/

select Referencing_Object_name, referencing_column_Name, Referenced_Object_name, Referenced_Column_Name from
(select Referenced_Column_Name = c.name, Referenced_Object_name = o.name, f.constid from sysforeignkeys f, sysobjects o, syscolumns c
where (f.rkeyid = o.id) and c.id = o.id and c.colid = f.rkey) r,
(select referencing_column_Name = c.name, Referencing_Object_name = o.name, f.constid from sysforeignkeys f, sysobjects o, syscolumns c
where (f.fkeyid = o.id) and c.id = o.id and c.colid = f.fkey) f
where r.Referenced_Column_Name = f.referencing_column_Name
and r.constid = f.constid
and Referenced_Column_Name = 'UserId' and Referenced_Object_Name = 'Users'
order by f.Referencing_Object_name

Note: This query does not make any data changes has no performance impact. Look for any suspicious tables, this should not return more than 10-11 tables.

Ash Prasad
Director of Engineering
DNN Corp.
 
New Post
7/11/2011 8:24 AM
 
Sorry Ash, we are on 5.6.2. I did run your script. Below are the tables I found. Do you find any of these suspect?
Blog_Blogs
DesktopModulePermission
FolderPermission
ModulePermission
Profile
Store_Addresses
TabPermission
UserAuthentication
UserPortals
UserProfile
UserRoles
UsersOnline
WorkflowStatePermission

 
New Post
7/11/2011 1:09 PM
 
Two tables that jump out here are Blog_Blogs and Store_Addresses. If your users have entries in the any of those, you won't be able to hard delete users. 

Ash Prasad
Director of Engineering
DNN Corp.
 
New Post
7/12/2011 1:16 PM
 
Ok, so in theory if I delete all those references to the users on those table I should be able to delete all users in DNN correct? I think all I would have to do is add a delete statement to the query you provided in a previous post?
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Bulk Delete UsersBulk Delete Users


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