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 ...Talking out Duplicate ResolutionTalking out Duplicate Resolution
Previous
 
Next
New Post
10/14/2012 1:46 PM
 

Hello,

I'm developing a set of modules for a large association. Because of the way our stuff has to work, we tend to end up with a number of problematic duplicate accounts. So, a user will have accounts under the names "jphillips" and "phillips" and "johnp" or whatever. I need a way to merge these accounts. Obviously, this is problematic in many ways, so, I am hoping somebody can help review my logic here or provide some insights. Obviously, in a big open system like DNN this is going to be hard and messy...

My thought is to follow these basic steps:

  • Make a module to manage duplicates and duplicate resolution
  • Add a hidden profile field that's "Merged to User ID"
  • make an "IDuplicateResolver" interface that lets me tell some sub-set of my modules that a two accounts should be merged. Here, our "membership" system would get a request that basically says "merge jphillips and phillips". Then, it will go through all of it's membership records and change jphillip's user ID to use phillip's user ID.
  • Implement that interface in every sub-area of my modules and implement a general one for the core 
  • Performing the merge:
    • Call my core duplicate controller to change every instance of UserID (a) to UserID (b) in all core tables
    • Call a similar extended controller  to look for common modules and change those UserIDs
    • Change User a's "Merged to User ID" profile field to be the UserID of user b
    • Delete user A
    • Log the action in my duplicate management tables

I know this is going to be messy... I am aware of these challenges:

  • Many changes are impossible through the API - so, I'll need a very big and complicated db procedure
  • Some modules may use usernames instead of user IDs
  • Some modules/tables may have restrictions against two records becoming tagged to the same person. For example, maybe some "events" modules  won't let you have the same user on the same event twice. Normally, this wouldn't happen, but, if both of my duplicate accounts were on that event, my duplicate resolution system would force it to happen.
  • Logging the changes is very difficult when this is done at the table level. 

Because I am only soft-deleting the old accounts, I don't think it's the end of the world if I miss some entries. I really just need to make sure security roles and my own stuff transfers. 

On a side note, this process does have me thinking a bit about a core change though... I feel like duplicate resolution would be a great feature to have on modules - just like searchable or exportable. In the tables, it's really just a matter of changing UserIDs whatnot to the other user.

Anyway - does anybody have any tips or anything I should watch for here? 

Thanks,

Mike

 
New Post
10/14/2012 9:12 PM
 
Superb!thank you for your article,This post has been somewhat of a revelation to me.I just required some information and was searching on Google for it. I visited each page that came on first page and didn’t got any relevant result then I thought to check out the second one and got your blog. This is what I wanted!
 
New Post
10/16/2012 11:34 AM
 
Would anybody happen to have any thoughts beyond the weird spam guy?
 
New Post
10/17/2012 6:52 AM
 
As long as you are focusing on your own (and other known) modules in a single site, you should be able to create a single stored procedure to perform the merge:
provide fromUId and toUId as parameters and update it in all your tables, where this won't violate duplicate keys (e.g. forum posts, ...), next lookup usernames and perform same modifications for all module tables, where it is used. Next you may delete depending records for the user to delete, before setting user to deleted.
ATM I am not aware of any plans to add such a function to the core framework (and how to deal with the situation, if there is a module, which relies on username/userid and doesn't implement the necesssary interface?)

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Talking out Duplicate ResolutionTalking out Duplicate Resolution


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