$value) { $result[$key]=utf8_decode($_SERVER[$value]); } return $result; } function auth_shib_attributes (){ //returns array containg attribute mappings between Moodle and shibboleth global $CFG; $config = (array)$CFG; $fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang", "guid"); $moodleattributes = array(); foreach ($fields as $field) { if ($config["auth_shib_user_$field"]) { $moodleattributes[$field] = $config["auth_shib_user_$field"]; } } $moodleattributes['username']=$config["shib_user_attribute"]; return $moodleattributes; } ?>