Page MenuHomePhabricator

user_externalaccount table goes out of sync when user try to login before adding it using "import from LDAP"
Closed, DuplicatePublic

Description

LDAP provider is setup
User/Password provider (created) but disabled.
LDAP provider does NOT allow registration, i.e. an admin needs to import the user.
The user try to login before the admin does anything, and fails.
The admin try to add the user using the "Import from LDAP" screen
The following error comes up:

Failed to add USERNAME
#1062: Duplicate entry 'ldap-self-USERNAME' for key 'account_details'

Even though an error message is displayed the user is added to list of users.
The user CANNOT login!!!

The only way I found to solve this was to remove the user using the "Delete User" screen and then manually delete the table record for that user from user_externalaccount

Event Timeline

noyeitan2 assigned this task to epriestley.
noyeitan2 raised the priority of this task from to Needs Triage.
noyeitan2 updated the task description. (Show Details)
noyeitan2 added a subscriber: noyeitan2.

Support Impact This is just completely broken and possibly destroys or mangles data.

chad triaged this task as Low priority.Nov 2 2014, 11:02 PM