DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
509 stars 54 forks source link

[Feature] Ignore guid changes #420

Closed SamuelWei closed 2 years ago

SamuelWei commented 2 years ago

Describe the feature you'd like:

We use this library to authenticate the users of a university.

Every user has a unique username, however the entryUUID can change in some cases.

The other day a user reported a 500 error within the application. The logs showed, that laravel tried to create a new user in the database, due to the guid change, but failed due to the databases unique attribute on the username column.

Is there a way to not use the guid or could you add a feature to allow automatic guid updates?

stevebauman commented 2 years ago

Hi @SamuelWei,

Have you configured existing user sync?

I believe it may cover this use-case, as it will perform an orWhere for a user who exists with the existing username and update their entryUUID in the database.

SamuelWei commented 2 years ago

Hi @stevebauman,

thank you for your quick response! I haven't seen this feature yet, it didn't exists when we setup this library.

It looks exactly like the feature of this issue. I'll try and close this issue if it resolves it.

stevebauman commented 2 years ago

Happy to help @SamuelWei, let me know if you encounter any issues! 👍

SamuelWei commented 2 years ago

@stevebauman I tried this new feature and it fixed the issue (https://github.com/THM-Health/PILOS/releases/tag/v1.9.3) Thank you very much for your quick reply and this great library!

stevebauman commented 2 years ago

Awesome! Happy to hear that @SamuelWei. I'm so glad you enjoy using LdapRecord 😄