-
Bug
-
Resolution: Fixed
-
Medium
-
5.5.2, 5.5.6, 5.6-OD-38-053, 5.9.0-OD-55, 6.0.0-OD-2016.03.1, 5.10.4, 6.2.2, 6.5.2, 6.6.0, 6.15.6, 6.15.9, 7.4.1
-
52
-
Severity 3 - Minor
-
42
-
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Also affects the current version of Confluence in all Cloud instances.
Steps to Reproduce in Self Hosted Confluence instances using LDAP:
- Add an LDAP user as a watcher to a page
- Remove the user from LDAP
- Sync the LDAP directory in Confluence
- View the page's Manage Watchers
- Try to remove the Unknown User
- Reload the page, and notice that the Unknown User still appears there:
Workaround
As a space administrator, remove the invalid user from the watchers list.
For a specific user
If the user disappears and reappears then do:
- Find the user:
SELECT username FROM user_mapping WHERE user_key IN (SELECT username FROM notifications WHERE contentid = <PAGEID>);
PAGEID can be determined by going to Ellipsis button > Page information and grabbing the last number in the Browser URL.
- Get your user_key by selecting the user from the previous query and searching with:
SELECT user_key FROM user_mapping WHERE username = '<YOUR_USERNAME_HERE>';
This will also fix the problem for any other pages that have that deleted user as a watcher
- Backup Database
- Delete all notifications for the invalid user:
DELETE FROM notifications WHERE username = '<YOUR_USER_KEY_HERE>';
For any invalid/deleted user regardless of the pages they're watching
- Find the invalid user list (this is to confirm that the listed users are actually invalid, before removing them):
SELECT n.notificationid AS "Notification ID" , s.spacename AS "Space Name" , n.contentid AS "Page ID" , c.title AS "Page Title" , um.username AS "Invalid User Name" , um.user_key AS "Invalid User Key" FROM notifications n INNER JOIN user_mapping um ON (n.username = um.user_key) INNER JOIN content c ON (n.contentid = c.contentid) INNER JOIN spaces s ON (c.spaceid = s.spaceid) WHERE um.lower_username NOT IN ( SELECT lower_user_name FROM cwd_user );
- Backup Database
Delete all notifications for the invalid users:DELETE FROM notifications WHERE notificationid IN ( SELECT notificationid FROM notifications n INNER JOIN user_mapping um ON (n.username = um.user_key) INNER JOIN content c ON (n.contentid = c.contentid) INNER JOIN spaces s ON (c.spaceid = s.spaceid) WHERE um.lower_username NOT IN ( SELECT lower_user_name FROM cwd_user ) );
For space watchers
- Find the invalid users:
select * from notifications WHERE username in (select user_key from user_mapping where lower_username NOT IN ( SELECT lower_user_name FROM cwd_user ));
- Delete all notifications for invalid users:
delete from notifications WHERE username in (select user_key from user_mapping where lower_username NOT IN ( SELECT lower_user_name FROM cwd_user ));
Confirm the workaround worked
- Reload one of the affected pages and check its Watchers
- If the affected page still shows the issue then Flush Cache (Confluence Administration > General Configuration > Cache Management > Flush all)
- causes
-
CONFCLOUD-54224 Notifications for users which no longer exist are preventing page operations
- Closed
- is related to
-
CONFSERVER-34474 Remove or hide a missing LDAP user's permissions, restrictions, and watches
- Gathering Interest
- relates to
-
CONFSERVER-54971 Unknown Users appears in Mentions, permissions, etc due to duplicates in the user_mapping table
- Closed
-
CONFCLOUD-34473 Deleted users still active on watcher's list for Confluence pages - show as an Unknown User and Cannot Be Deleted.
- Closed
-
CONFSERVER-10195 Inconsistent Personal Space behavior when an external user (LDAP/Crowd/JIRA) is removed or deleted
- Closed