setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); $as = new SimpleSAML_Auth_Simple('default-sp'); $as->requireAuth(); $attrs = $as->getAttributes(); $uname = $attrs['uid'][0]; $isAdmin = $userManager->isAdmin($uname); $projectGroup = $userManager->hasGroup($uname, 'prosjekt'); $activityGroup = $userManager->hasGroup($uname, 'aktiviteter'); if(!($isAdmin | $projectGroup | $activityGroup)){ echo 'Her har du ikke lov\'t\'å\'værra!!!'; exit(); } ?>

Stor-gutt-leketøy