Combining two different users

Hi Everyone,

So currently, we have two confluences and are in the process of merging both of them. It's simple enough by doing the full backup of confluence A then importing the spaces individually from confluence B. However, what we've found is that our main problem lies within the users.

what would be the best way to merge users from both confluences? On confluence A, the users are managed by crowd but on confluence B the users are managed by the confluence user directory. Additionally, the user name conventions are not the same across both. - We are well aware that there may be two user accounts for one user as a result. We're just wondering what the best way would be to go about this.

Additionally, we're just wondering if confluence will recognize a user import and matchup the user names respectively. I.e. on a page it says last modified by unknown user: (Jane Doe), would this automatically refresh itself, once we imported Jane Doe's credentials? Or do we need to import the users first and the spaces last?

Many thanks everyone. :)

4 answers

Hey Jessica,

Firstly let me start replying your questions:

  • What would be the best way to merge users from both confluences?

There is a method we can try, however it involves database manipulation and some testing in your end.

  • Additionally, we're just wondering if confluence will recognize a user import and matchup the user names respectively. I.e. on a page it says last modified by unknown user: (Jane Doe), would this automatically refresh itself, once we imported Jane Doe's credentials? Or do we need to import the users first and the spaces last?

By default, nope, confluence will not refresh things automaticaly, however depending on the version you are that might be possible.

Let me know your Confluence version and depending on that I might be able to provide you a work around to achieve that end :).

Thanks and Regards,
David|Confluence Support Engineer


I would recommend to make the usernames to be matched before the migration if you don't want to make post-merge work with the database. You should prepare the mapping list and then one of the options is to change usernames in the source confluence one by one (see https://confluence.atlassian.com/display/DOC/Changing+Usernames) but that depends on confluence version you have.

The other option (if you have thousands of usernames) is to export your site with xml (or make database dump) and then make the change with automate script that will find the matches - but you should examine that dump carefully. As the example script please find https://confluence.atlassian.com/display/CONF35/Changing+Usernamesd but please note that script I provided is for confluence 3.5 and can differ for other versions of confluence.

0 vote

Since Confluence 5.2.3 we have started to use the *cwd_mapping* table which identifies the users with hashes instead of only the username. In older version of Confluence, the data/ramification would only "depend" of the username.

To do it, we need to track which hash is being used and modify it according to the output. Basically, what we would need to follow by standard procedures:

1) First, find the user key (hash) inside the user_mapping table:

select * from user_mapping;

2) Then, check for which directory ID comes the user

select * from cwd_user;

3) Then, identify from which directory the user is inside, since we have only found the ID in the query above

select * from cwd_directory;

After getting all the content, we would need to update the username user_key to use the one from the user that you're looking for. PS: Always remember to do a backup of the database.

Cheers,

Giu

Hi Deividi,

Thanks so much for your reply,

I believe my confluence version is 5.2 :)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,694 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you