hamishcampbell / silverstripe-auth-external

SilverStripe External Authentication Module
13 stars 21 forks source link

No match if user is member of more external groups than added in setAutoAdd #18

Closed svandragt closed 8 months ago

svandragt commented 11 years ago

There will be a fix for the issue where user is added to the fallback group even though there is a match in the AutoAdd group array.

This is because any external groups lower in the list then the number of autoadd groups are never matched. So if you are a member of 6 groups and add 2 autoadd group rules then groups 3-6 are never matched correctly.

Immediate fix is to change ExternalAuthenticator.php:706 change line for ($count = 0; $count < count($autoadd); $count++) { to for ($count = 0; $count < count($groupinsrc); $count++) {