Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I had a problem with IsUserInRole() returning false, but the role was listed for the user when i called GetRolesForUser().
I reflected the ActiveDirectoryRoleProvider, and found this loop in IsUserInRoleRecursive():
The problem is if array2 contains a group (if not only one group, and that group happens to be the last entry in array2). The loop will get a result from the recursive call, and return that value even if it's false, instead of keep searching the list (array2).