1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<?php
/*
* consentSimpleAdmin - Simple Consent administration module
*
* shows statistics.
*
* @author Andreas Åkre Solberg <andreas.solberg@uninett.no>
* @package SimpleSAMLphp
*/
SimpleSAML\Utils\Auth::requireAdmin();
// Get config object
$config = SimpleSAML_Configuration::getInstance();
$consentconfig = SimpleSAML_Configuration::getConfig('module_consentSimpleAdmin.php');
// Parse consent config
$consent_storage = sspmod_consent_Store::parseStoreConfig($consentconfig->getValue('store'));
// Get all consents for user
$stats = $consent_storage->getStatistics();
// Init template
$t = new SimpleSAML_XHTML_Template($config, 'consentSimpleAdmin:consentstats.php');
$t->data['stats'] = $stats;
$t->show();
|