Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Combining two different users

Jessica Foo August 10, 2014

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

0 votes
Jessica Foo August 25, 2014

Hi Deividi,

Thanks so much for your reply,

I believe my confluence version is 5.2 :)

0 votes
Giuliano C_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2014

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

0 votes
Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2014

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 votes
Deividi Luvison
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2014

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


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events