Permalink
Browse files

Got rid of warning messages

  • Loading branch information...
1 parent 21e00ab commit ba1b4cd1ef082b5b5a76c028af39f36a4b3568f1 exe-cutor committed Jul 11, 2007
Showing with 7 additions and 2 deletions.
  1. +7 −2 auth/shibboleth/auth.php
View
9 auth/shibboleth/auth.php
@@ -87,7 +87,12 @@ function get_userinfo($username) {
$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 @@ function get_first_string($string) {
}
}
-?>
+?>

0 comments on commit ba1b4cd

Please sign in to comment.