Closed (fixed)
Project:
Lightweight Directory Access Protocol
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2012 at 09:42 UTC
Updated:
13 Mar 2013 at 03:50 UTC
Hi,
The problem occurs when the automatic creation of authenticated users (LDAP Authentication).
The first works without problems. In contrast, during the second test, there is a conflict on the table of values.
The "db_update_placeholder_0" is empty. In this test, my users have the same password, so I get an error of integrity constraint.
When I check the configuration, I do not have access to this information.
What do you think?
Where is the problem?
Thks for help.
| Comment | File | Size | Author |
|---|---|---|---|
| conflit_ldap.PNG | 68.65 KB | mateooo35 |
Comments
Comment #1
johnbarclay commentedthe empty placeholder indicates the derivation of the username from the ldap entry isn't working. It also indicates bad error checking in the code.
When you test the username you are expecting in the ldap server test link, does it derive a reasonable username? You may have to share some of your ldap server user settings to figure this out.
Comment #2
tgreenlaw commentedI'm having the exact same issue as the original poster.
I created an account for myself first, and it worked without any problems. But every user after me is seeing the same error message as posted above where it's trying to update the row in the user table with my ID, and it's using a blank name which is raising a unique constraint violation with ID 0.
The LDAP data coming back during testing looks perfect. I tried it on at least 6 different users as they reported the issue. The code also grabbed (and stored) everything correctly for me as the first user.
Please let me know which pieces of configuration info would be the most helpful for you.
Comment #3
johnbarclay commentedComment #4
johnbarclay commentedCan you try 7.x-2.0-dev? I'm wondering if this has to do with issue #1836950: ldap user and ldap servers: Warning: Invalid argument supplied for foreach() in ldap_servers_token_tokenize_entry() where ldap user tries to create or synch non ldap associated accounts.
Comment #5
tgreenlaw commentedEdit: Re-Corrected response.
I found a fix to the issue that seems to be working.
Under the LDAP Server configuration, I had to remove dn from the Persistent and Unique User ID Attribute. Leaving it blank seems to have prevented the error being raised.
It's throwing a couple of additional warnings now when anyone logs in.
This one happens after a successful test of the account:
Warning: Illegal string offset 'attr' in LdapServer->groupUserMembershipsFromUserAttr() (line 1493 of D:\Webs\WorldView\web\sites\all\modules\ldap\ldap_servers\LdapServer.class.php).This one happens after login:
Notice: Undefined variable: watchdog_tokens in ldap_authorization_user_login() (line 98 of D:\Webs\WorldView\web\sites\all\modules\ldap\ldap_authorization\ldap_authorization.module).Testing users from the configuration page is still returning the correct info.
Comment #6
johnbarclay commentedThe first error should be covered in the patch I just committed: http://drupalcode.org/project/ldap.git/commitdiff/48c13b1ba6852c58c6bb38...
The second error should have been fixed by a previous patch.
Comment #7
johnbarclay commented