Go to the source code of this file.
◆ oauth_hook_cron()
oauth_hook_cron |
( |
& |
$croninfo | ) |
|
Hook to run a cron job.
- Parameters
-
Definition at line 7 of file hook_cron.php.
References $croninfo, $message, $oauthconfig, $store, SimpleSAML_Configuration\getOptionalConfig(), and SimpleSAML\Logger\warning().
8 assert(
'is_array($croninfo)');
9 assert(
'array_key_exists("summary", $croninfo)');
10 assert(
'array_key_exists("tag", $croninfo)');
14 if (is_null(
$oauthconfig->getValue(
'cron_tag',
'hourly')))
return;
19 $cleaned =
$store->removeExpired();
22 $croninfo[
'summary'][] =
'OAuth clean up. Removed ' . $cleaned .
' expired entries from OAuth storage.';
25 $message =
'OAuth clean up cron script failed: ' . $e->getMessage();
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
catch(Exception $e) $message
static getOptionalConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.