Merged changes from stable
authorexe-cutor <exe-cutor>
Wed, 11 Jul 2007 08:30:01 +0000 (08:30 +0000)
committerexe-cutor <exe-cutor>
Wed, 11 Jul 2007 08:30:01 +0000 (08:30 +0000)
auth/shibboleth/auth.php

index 2647f92..b67a5a1 100644 (file)
@@ -87,7 +87,12 @@ class auth_plugin_shibboleth extends auth_plugin_base {
         $search_attribs = array();
 
         foreach ($attrmap as $key=>$value) {
-            
+          // Check if attribute is present  
+         if (!isset($_SERVER[$value])){
+               $result[$key] = '';
+               continue;
+          }
+
             // Make usename lowercase
             if ($key == 'username'){
                 $result[$key] = strtolower($this->get_first_string($_SERVER[$value]));
@@ -224,4 +229,4 @@ class auth_plugin_shibboleth extends auth_plugin_base {
     }
 }
 
-?>
\ No newline at end of file
+?>