use case-insensitive check for is_fsf_staff check
authorAndrew Engelbrecht <andrew@fsf.org>
Mon, 24 Apr 2023 20:25:21 +0000 (16:25 -0400)
committerroot <root@login0d.fsf.org>
Mon, 24 Apr 2023 20:25:21 +0000 (16:25 -0400)
lib/Auth/Source/FSFDrupalAuth.php

index a543e04003ce50626b550c2f85952d7821e7c9f6..2acdc656b0a1280efc47046aa5dc3d2273669744 100644 (file)
@@ -422,9 +422,9 @@ class FSFDrupalAuth extends \SimpleSAML\Module\core\Auth\UserPassBase
                 }
                 $value = (string) $value;
 
-                if ($value === $username) {
+                if (strtolower($value) === strtolower($username)) {
                     // they are staff
-                    $attributes[$key] = ['true'];
+                    $attributes['is_fsf_staff'] = ['true'];
                     break;
                 }
             }