How to change local user's e-mail address in Confluence
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This KB will help to change the email address of a local user in Confluence from Database when email updation can't be done via UI.
Solution
- As this involves database manipulation, do take a backup of the database before executing any UPDATE, ALTER, or DROP statement.
- Test the solution in a staging environment before applying it to the production environment
- This will require downtime as Confluence needs to be restarted after making the DB changes, hence please plan this activity accordingly.
- This workaround is only for users from the internal user directory.
- Run the following query for the user whose email you need to change
select * from cwd_user c inner join cwd_directory d on c.directory_id=d.id where user_name= 'name of the user' and d.directory_name='Confluence Internal Directory'
- Please ensure that you only have 1 result in the above query result.
- Update the email with the following query
update cwd_user set email_address = 'example@email.com', lower_email_address = 'example@email.com' where id = (select c.id from cwd_user c inner join cwd_directory d on c.directory_id=d.id where user_name= 'name of the user' and d.directory_name='Confluence Internal Directory')
- Replace the example@email.com with the correct email.
- Go to the Cache Management page.
- Scroll down the page and click on the Flush All button.
- Check the results. If the email wasn't changed, restart Confluence.
Please ensure that you only have 1 user with the 'name of the user' username or the email will be updated for all users with that username.