getAttributes(), "user", "User"); ?>
" . _("Edit User Details") . " ";
if ($user->isFederationAdmin())
echo "";
if ($user->isSuperadmin())
echo "";
?>
listInstitutionsByAdmin($_SESSION['user']);
if (sizeof($has_inst) > 0) {
// we need to run the Federation constructor
$unused = new Federation("LU");
echo "" . sprintf(ngettext("You are managing the following institution:", "You are managing the following %d institutions:", sizeof($has_inst)), sizeof($has_inst)) . " ";
$instlist = array();
$my_idps = array();
$my_feds = array();
$fed_count = 0;
echo "";
foreach ($has_inst as $inst_id) {
$my_inst = new IdP($inst_id);
$inst_name = $my_inst->name;
$fed_id = strtoupper($my_inst->federation);
$my_idps[$fed_id][$inst_id] = strtolower($inst_name);
$my_feds[$fed_id] = $unused::$FederationList[$fed_id];
$instlist[$inst_id] = array("country" => strtoupper($my_inst->federation), "name" => $inst_name, "object" => $my_inst);
}
asort($my_feds);
foreach ($instlist as $key => $row) {
$country[$key] = $row['country'];
$name[$key] = $row['name'];
}
echo "" . _("Institution Name") . " " . _("Other admins of this institution") . " " . _("Administrator Management") . " ";
foreach ($my_feds as $fed_id => $fed_name) {
echo "" . sprintf(_("Institutions in federation %s"), $fed_name) . " ";
$fed_idps = $my_idps[$fed_id];
asort($fed_idps);
foreach ($fed_idps as $index => $my_idp) {
$oneinst = $instlist[$index];
$the_inst = $oneinst['object'];
echo "" . $oneinst['name'] . " ";
echo " ";
$admins = $the_inst->owner();
$i_am_blessed = FALSE;
foreach ($admins as $number => $username) {
if ($username['ID'] != $_SESSION['user']) {
$coadmin = new User($username['ID']);
$coadmin_name = $coadmin->getAttributes('user:realname');
if (count($coadmin_name) > 0) {
echo $coadmin_name[0]['value'] . " ";
unset($admins[$number]);
}
} else { // don't list self
unset($admins[$number]);
if ($username['LEVEL'] == "FED")
$i_am_blessed = TRUE;
}
}
$number_of_other_admins = count($admins); // only the unnamed remain
if ($number_of_other_admins > 0)
echo ngettext("other user", "other users", $number_of_other_admins);
// foreach ($the_inst->owner() as $admin)
// if ($admin != $_SESSION['user'])
// echo $admin . " ";
echo " ";
if ($i_am_blessed)
echo "
";
echo " ";
}
}
echo "
";
}
else {
echo "" . _("You are not managing any institutions.") . " ";
};
if (Config::$CONSORTIUM['selfservice_registration'] === NULL) {
echo "" . _("Please ask your federation administrator to invite you to become an institution administrator.") . "
";
echo "
";
} else { // self-service registration is allowed! Yay :-)
echo "
";
}
?>