strebl / ldap-auth

ldap-auth
MIT License
32 stars 15 forks source link

Group Membership Data Incorrect #19

Open Korthal opened 9 years ago

Korthal commented 9 years ago

Heya!

Started looking to set this up for AD Authentication on a work project via a Laravel install. So far can Authenticate and log in just fine.

However I have noticed that when pulling the Group Membership for a user it appears to be incorrect. Specifically every single group is missing the first 3 characters.

Pastebin Example

The above is a direct pull from a dd(Auth::user()); specifcally my personal account. I have just removed some Groups and changed the name to Test User for security. But if you notice, the first 3 letters of all groups are showing incorrectly.

"inistrators" => "inistrators" - Should be Administrators "erprise Admins" => "erprise Admins" - Should be Enterprise Admins "ain Users" => "ain Users" - Should be Domain Users

etc.

strebl commented 9 years ago

On which version are you? That should be fixed in the v2.1.3 release.

Korthal commented 9 years ago

Hey man, the currently installed version was 2.1 (as per installation instructions on front page using: composer require strebl/l5-ldap-auth:~2.1)

I've just, now, changed to reflect specifically 2.1.3 directly and have run composer update. Will check and get back to you :)

strebl commented 9 years ago

You should get 2.1.3 if you have strebl/l5-ldap-auth:~2.1.

But because you said that, I updated the readme. ~2.1 is wrong because it would also include 2.2 etc.

Thanks :)

Korthal commented 9 years ago

Finally managed to get it working again, updated straight from 2.1 -> 2.1.3.

Originally it refused to login, even using Username/Pass it woudl consistently state an email field was missing which was resolved by changing a setting within one of the core files (i cannot find it now haha) as it indicated it was looking for the email field.

Now attempting to figure out how to authenticate based on if a user is in a specific group :)