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 ...User Insert_IdentityUser Insert_Identity
Previous
 
Next
New Post
10/13/2011 9:09 PM
 
Got a DNN 4.9.5 instance. A user deleted the user account, and this has orphaned some records. If I could create a new user with the same userid at the database level, that would be helpful.

My thoughts are that the best way to do this would be to create a new user via DNN account management, and then go to the user tables and update the userid to the userid I want. That I think I can do with no problem. users, userportals, userroles, userprofile ... any other tables I need to consider? the aspnet tables join on the username, not the userid, so nothing there, right?

The corollary to this question: I need to ensure that users are not able to delete their accounts. I'm thinking that this will require some customization of baseline DNN. Thoughts on this?

Thanks -

pmgerholdt
 
New Post
10/14/2011 4:38 AM
 
in 4.x dotnetnuke did "true" deletes so when the user was deleted the relevant user pieces that were linked should have been deleted too e.g. userroles etc. so creating a new user (and editing the userid - which would require disabling identify inserts , editing it and reenabling identify inserts possibly with a reseed) will not restore your data.

DotNetNuke 5 introduced the concept of "soft" deletes where a user deleting just sets an isdeleted flag so that the data is preserved and can be audited (note: in later releases,, 5.6.0 I believe, a "hard" delete function was made available to admin/host users in the admin->users page) - i would recommend you upgrade to a later version rather than make core edits in 4.9.5 as you will have effectively created your own fork and may not be able to upgrade in future.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/14/2011 7:40 PM
 
Am familiar with the changes to soft deletes, and upon reflection realize that you are right, this will fix the problem going forward (upgrading). (Most of my sites are at DNN 6 but a couple sit at 495. Needed to wait for client business cycle to allow an upgrade event).

Regarding the identity insert question for my current situation, though - I don't need to reduplicate every aspect of the original user account. The question remains - If I create a new user, can I then change the userid via database in the tables I mentioned without causing other issues?

All I need is to recreate a user account with a previously used userid. Once I have done that, certain records in a third-party module will no longer be orphaned, and I can then use some in-built features to change the user/owner to a new, active user. That feature will not work with the original user not existing.

Thanks



pmgerholdt
 
New Post
10/15/2011 5:56 AM
 
any direct database updates can break referential integrity and cause future upgrades/portal running to fail - rather than mess with dotnetnuke's integrity id suggest registering a new user with the same details and updating the 3rd party modules data to point to the new userid

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...User Insert_IdentityUser Insert_Identity


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