Confluence : Changing Usernames
This page last changed on Oct 27, 2006 by ivan@atlassian.com.
It is not currently possible to update a user's username through the Confluence user interface. There is a Jira issue where you can vote for this feature: CONF-4063. The methods below involve directly modifying the database, they should not be performed without doing a backup first. Usernames are used as the unique identifiers for all actions of a user throughout the system. Therefore, you must update all the tables that use this to reference the user. This information has been adapted from the forum thread. Solution 1: Update the database directlyAssuming you have a mapping table called usermigration that contains columns for old and new names, the following SQL will work for Confluence. update attachments set creator = newusername from usermigration u where creator = u.oldusername; update attachments set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update content set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update content set creator = newusername from usermigration u where creator = u.oldusername; update content set username = newusername from usermigration u where username = u.oldusername; update extrnlnks set creator = newusername from usermigration u where creator = u.oldusername; update extrnlnks set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update links set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update links set creator = newusername from usermigration u where creator = u.oldusername; update notifications set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update notifications set creator = newusername from usermigration u where creator = u.oldusername; update pagetemplates set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update pagetemplates set creator = newusername from usermigration u where creator = u.oldusername; update spaces set creator = newusername from usermigration u where creator = u.oldusername; update spaces set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update spacepermissions set permusername = newusername from usermigration u where permusername = u.oldusername; update spacepermissions set creator = newusername from usermigration u where creator = u.oldusername; update spacepermissions set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update contentlock set creator = newusername from usermigration u where creator = u.oldusername; update contentlock set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update emailtemplates set creator = newusername from usermigration u where creator = u.oldusername; update emailtemplates set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; update emailtemplates set username = newusername from usermigration u where username = u.oldusername; update os_user set username = newusername from usermigration u where username = u.oldusername; update trackbacklinks set creator = newusername from usermigration u where creator = u.oldusername; update trackbacklinks set lastmodifier = newusername from usermigration u where lastmodifier = u.oldusername; Solution 2: Dump database to SQL, update then reimportIf your database supports it (e.g. MySQL), perform the following steps. Assuming existing confluence user 'olduser' exists. 1. Create new user 'newuser' via Confluence. Log in as 'newuser'. All content previously associated with 'olduser' should now belong to 'newuser'. Thus, you can now safely remove 'olduser' via Confluence. The reason to not search and replace in the os_user tablePotential corruption of database
RELATED TOPICS
|
![]() |
Document generated by Confluence on Feb 08, 2007 00:00 |