DirectoryTree / LdapRecord-Laravel

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

Emulate memberof #565

Closed cheesegrits closed 10 months ago

cheesegrits commented 12 months ago

Hey Steve,

This isn't a PR for merging, it's just to show you how I went about emulating 'memberof'.

It's mostly done inside applyBatchModificationToModel(), which means it just naturally picks up any changes to the 'member' attribute made in the EmulatesModelQueries trait.

Cases where applyBatchModificationToModel() doesn't get called, like insert(), delete() and updateAttributes() in EmulatesQueries, I do the emulation in those methods.

stevebauman commented 10 months ago

This PR really helped with #584, thanks @cheesegrits! 🙏