Adldap2 / Adldap2-Laravel

LDAP Authentication & Management for Laravel
MIT License
911 stars 184 forks source link

Not matching e-mail address even if still exists #920

Open tcagkansokmen opened 2 years ago

tcagkansokmen commented 2 years ago

Laravel Version: 8 Adldap2-Laravel Version: 6.1 PHP Version: 7.4

I have users table.

I'm trying to make their authentication with LDAP. But when user login, It tries to recreate It's record if 'username' and 'objecthuid' columns are empty. But there's still a user with same e-mail address, so that singularity validation returns error "there's still a record with that email address."

I want to work with LDAP like; "If email exist, then login and update. If not exist so create new record."

stevebauman commented 2 years ago

Hi @tcagkansokmen,

LdapRecord supports this feature out of the box. I’d recommend moving to it:

https://ldaprecord.com/docs/laravel/v2/auth/database/configuration/#sync-existing-records