Ability to merge users


(Dan Porter) #1

I would like to suggest the ability to merge multiple users in Discourse. Occasionally, some people on our hackerspace discourse login with Facebook instead of Google, end up creating two accounts, and posting from both of them. Sometimes, members have changed the e-mail address they use, by creating a new account and continuing to use this.

Simply, it’s a common enough occurrence that users accidentally have multiple accounts, and outside of database trickery there’s no simple way of merging one user into another.

My suggestion is that either from or to, merging userA into userB will change the userid of any Topic, Post, PM, etc to that of userB. As an extra, it would be nice if ‘post read count’ & ‘time spent’, etc. was appended, and that any mention of userA in a post was also replaced by userB in the body of the post (the rename user feature does not currently do this either.)

Edited for clarity.


Is there a way to merge accounts?
Merging two users
Allow authentication via multiple services on one account
Is there a way to merge accounts?
Helping imported users claim their posts
Import posts from Facebook group into Discourse
Discourse Version 2.0
Two emails for one user
Two emails for one user
Users listed as new/pending after replying to emails-from a different address
(Nicholas Perry) #2

I support this feature. I think I have 6 accounts over at Lionheadstudios due to the changes they’ve made over the years.

Some implementation thoughts:

It could get quite difficult to go through and scrub all the old post ids. It might make sense to keep both accounts “active” in the system for some purposes and just have a redirection field called “real user ID”. I imagine the @mentions could be changed to have their decorator look for the real_user field before deciding what to draw, and going to /users/[username] could also do the same check before deciding what to display.

There are also some weirdness that could happen when a user is merged multiple times - there would have to be a clean up callback to repoint the real_user field if it is X levels deep so that it doesn’t go down thousands of checks every time that user is loaded.

Rolling back would just be a mater of putting the real_user id field back to what it was previously before the change.

I’d have to look closer, but an elegant way to do it would be to have one discourse account effectively becomes a locally validated ‘openID’ to login to another account, you could leverage the same underlying redirection mechanism afforded to allow users to login via mutliple openIDs

A bonus feature would be a GUI to help merge account details so that the end user can decide what stays and what goes and not depend on a moderator.


(Jeff Atwood) #3

Provided the accounts map to the same email address, they are considered the same user.

That is, if:

  • facebook account is user@example.com
  • google account is user@example.com

Then you can log in with either set of credentials to that account, because the Discourse identity is user@example.com

If users log in with different email addresses, there’s not much we can do. The email address is your identity from our perspective.


(Dan Porter) #4

This makes sense. I’m surprised actually, how many people use different e-mail addresses for Facebook, Google, etc.

A better example would be one of our members, Ben, recently became a director of the charity. He ‘logged in’ using his new Google Apps identity (ben@hackerspacename.example) rather than his personal address.

Although there is a change e-mail facility, it seems neither Ben, nor 4 other users, considered using this option. To them it was far easier to just login with their new e-mail address.

Due to this I still feel that for admins of small forums, it would be nice to have the ability to merge one users content into another. If they had created an account, but not posted anything, I would have simply deleted the new account and changed the e-mail address of the old. In Ben’s case, it was within 2 days that his new account was created and he was already actively posting and creating many topics.

A degree of user education helps (naturally is the case behind disparate topic categories and post etiquette) but occasionally, I’m left with a situation like this where I need to merge users, and cannot.


(flit) #5

I often use different email addresses in order to track spam sources, especially if I am not very sure of a site before I sign up to it. (For instance, because of the reputable lineage of this site, I did not create it its own unique email address but instead reused one, but I am using a “forum” address that I often use at new forums or anything that I may want to tweet, rather than my “main” address. That was simply reflex! Some forums don’t feel “forumy” to me so I use my main address.)

Also, email addresses change quite often, sometimes abruptly, particularly if users are signing on from work (jobs change quite a bit for most people over their course of their life), hosting sites change or vanish, or as users abandon or change email address for whatever reason.

I am also not clear that all of your authentication services use an email address as the key or if they do if they will share it with you – twitter keys off username, for instance, and while G+ is tied to a gmail account, I believe that their own account merge functions mean that it’s really their account number that is the real user key, because that gmail account can change over time.

Some way to merge two accounts, even if their email differs, would support a wider range of activity and a longevity of presence and a good ability to consolidate identity even if the email “key” changes with time. You may also want to think about secure ways for users who are no longer using an email account to regain access to that identity. It could be as simple as being able to add backup authentication (such as using a second email account or facebook or twitter) and hence already part of a sensible merge function.

Reputation systems only become stronger if the code implicitly encourages users to link an active presence on a forum to an active presence on another forum, without forcing them to do it and letting them try it out first to see what it’s like; abandoning those “throwaways” that become real accounts later seems like a waste.

Also note that if you permit it, non-Discourse services might start using you as an identity service in your own right (I could see it being a rich identity service), and plan accordingly for a way for people to be able to organize a durable identity that spans multiple email addresses, changes of name, and phases of life.

You may want to key off a more durable-to-you identifier than an email address, such as unique username or unique username(at)discourse.org. (I.e. someone who wishes to be foo on the playtime.org forum and baz on the workstuff.com forum yet logs in to both of those using a common email address of biff(at)gmail.com may not want to “cross the streams” and have those two identities automatically consolidated even though they are using the same email address.

If you do wish to consolidate via email address, then make sure the user knows it will happen so that there is not an inadvertant “outing” of foo(at)playtime.org to their colleagues at workstuff.com for their perfidious nerf habits.

Even with sophisticated users, identity is just highly fluid, for a lot of reasons, and it’s not necessarily a bad thing to let people start out compartmentalized and tentative and consolidate later when they trust the site.

(Sorry about the clunky examples – I am brand new here and have not figured out how to escape the ‘at’ sign for example email addresses.)


(Nicholas Perry) #6

I figure those would have been decoupled. What would it take to change this?


(Jeff Atwood) #7

Rearchitect the entire application from scratch.


(Joshua Frank) #8

I also support this. I’ve been sending out bulk invitations and people have been joining manually. Sometimes a person is on a mailing list with a different email address than the one they used to join manually, and now they’re in the system twice. I don’t think the merging needs to be complex, just to collapse all post ownership into one email address that the admin can choose.


(Nabin Hait) #9

+1

I also need the merging feature. Recently we have implemented discourse and migrated data from two existing googlegroups. Now, many users have 2 accounts, which is very much annoying from a user perspective. Atleast Admin should have the rights to merge 2 accounts.


#10

Ditto. This is my biggest difficulty at the moment.
I have a large number of users that signed up with a new account but want to retain the posts on their old one. They generally start posting on the new account before letting me know that, so I can’t just delete one.

Our decision to only allow one account per address makes it even more complicated.

@codinghorror are there any plans for a merging feature in the future? I know that @zogstrip can do it manually, but I don’t have that ability.


(Jeff Atwood) #11

This is a difficult feature in my experience, having done it at Stack. Fraught with edge conditions and weirdness (what if you need to undo a merge?). It is a big chunk of work, easily 2 weeks for 1 full time person, plus probably a week of tweaking later.


#12

We used it extensively on vB with no downside, but I’m hearing you on the amount of work required to make it happen here.
Prob not worth it at this stage. Thanks for the response.


(Erlend Sogge Heggen) #13

Maybe a non-destructive way to do it would be:

Bob owns both UserA and UserB and would like to only keep using UserB.

  • Lock down the superfluous account, UserA. Maybe put a greyscale version of UserB’s avatar on there or smt.
  • Merely mask UserA’s posts with UserB’s.
  • Transfer all Watch/Track/Stars of UserA to UserB.

So, if you looked at UserB’s profile you wouldn’t actually find the posts that are in reality written in UserA’s name, but at least on the surface, it’d look like UserA never existed; no one will think to @mention UserA or find his profile (could even be excluded from searches), and replies to his threads will notify UserB.

One slightly annoying thing I can think of is that if UserA’s old posts get a lot of likes, which would still go to UserA even though it’s UserB’s profile that’s slapped on top of the post, that could get a bit frustrating. Then again, it’s better than nothing, and you can always live in hope that we’ll eventually get real merging.


(Rob Reed) #14

Similar to what @erlend_sh is suggesting (unless I’m mistaken), what about the ability to transfer ownership of content from one user to another? I’m just getting started with Discourse so for all I know it’s already possible, but I’m assuming someone here would have mentioned it if so.

I’ll also add that migrating a forum seems to introduce issues related to this. It’s hard to control what users do as part of the transition. It’s happening that people are spreading content across 2 accounts without realizing it.


#15

It’s not possible, and that would be awesome. It would solve my issues. It’s effectively a merge…


(Jeff Atwood) #16

It is possible, use the admin wrench, select posts, then change owner.


#17

Damn it. Still so much to discover. Thanks.


(cpradio) #18

Except you have to track down every post, so if they have more than 20 posts, this would be a painful process :wink:

It would be nice if there was a “Change Ownership” button next to their post count in the Admin > User Profile screen. That way it could be done for all posts in one click.

Screenshot of mockup:


(Thomas Purchas) #19

I’ve just tried this on my forum. However after transferring the posts, they still appear in the post created count, and thus prevents me from deleting the account.

So now I have a dead account with no posts associated with it (except in the history of the transferred posts), and I can change its email address so the would-be owner of the account can’t use that email address on our forums any more,


Unable to delete user after transferring post ownership
(cpradio) #20

Which is reported as a bug