Problem creating new user via LDAP after different user pushed a commit with the same email address?
Ran into a weird situation today with a new developer that couldn't create account via LDAP. Running 7.10.
It was showing an error in logs
unicorn.stdout.log:E, [2015-06-25T05:46:58.531959 #3936 (closed)] ERROR -- omniauth: (ldapmain) Authentication failure! ldap_error: NoMethodError, undefined method `provider' for nil:NilClass
and then in application.log:
June 25, 2015 05:46: (OAuth) Error saving user: ["Email has already been taken"]
Here's where it gets weird - I found the email address in the 'emails' table, associated to a completely DIFFERENT user. Talking to the other devs, apparently, the other user that was involved pushed changes into repo that were authored by this other userid.
I completely get assigning "known" possible email addresses by default when commits come in, but seems like an authentication request should override that and take ownership of the address. The situation of one user (with perms) pushing changes in for a completely different author that hasn't yet been granted access - seems like it would be fairly likely.