Hello there,
Just testing the latest SuiteCRM beta with LDAP integration.
I’m using OpenLDAP behind.
The thing is:
- login doesn’t work (see below for details)
- … but user auto create is working! (with the right values)
So I wonder what could be the issue and how can I add debug so I can see what’s the real problem.
The log is saying:
[2022-10-08 19:48:21] request.CRITICAL: Uncaught PHP Exception Doctrine\ORM\NonUniqueResultException: "More than one result was found for query although one row or none was expected." at /mypath/suitecrm/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php line 928 {"exception":"[object] (Doctrine\\ORM\\NonUniqueResultException(code: 0): More than one result was found for query although one row or none was expected. at /mypath/suitecrm/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:928)"} []
Since auto create works, I’m relatively confident that my LDAP config is OK (otherwise, I couldn’t fetch the info and have the account created).
My .env.local
config:
AUTH_TYPE=ldap
###> LDAP CONFIG ###
LDAP_HOST='myldap.example.com'
LDAP_PORT=389
LDAP_ENCRYPTION=tls
LDAP_PROTOCOL_VERSION=3
LDAP_REFERRALS=false
LDAP_DN_STRING='uid={username},ou=people,dc=example,dc=com'
LDAP_QUERY_STRING=''
LDAP_SEARCH_DN=''
LDAP_SEARCH_PASSWORD=''
###< LDAP CONFIG ###
###> LDAP AUTO CREATE CONFIG ###
LDAP_AUTO_CREATE=enabled
LDAP_PROVIDER_BASE_DN='ou=people,dc=example,dc=com'
LDAP_PROVIDER_SEARCH_DN=''
LDAP_PROVIDER_SEARCH_PASSWORD=''
LDAP_PROVIDER_DEFAULT_ROLES=ROLE_USER
LDAP_PROVIDER_UID_KEY='uid'
LDAP_PROVIDER_FILTER=''
If there’s a way to put a debug string somewhere to understand the content of $result
, I’ll be happy to do so
Thank you!
edit: it seems that I already have some records in the database, despite I removed it from the UI. It’s like there’s a new user record created at each connection. Can I safely remove them from the database?