diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-15 18:27:58 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-15 18:27:58 -0500 |
commit | 71ddd4172040b5603a4288ec07c78d7e70f997b7 (patch) | |
tree | 951b56b9c001950e1e02a6cba5122066702a629e | |
parent | 9f63c976f866a8a4981dee72c36d09448c6a5582 (diff) | |
download | elgg-71ddd4172040b5603a4288ec07c78d7e70f997b7.tar.gz elgg-71ddd4172040b5603a4288ec07c78d7e70f997b7.tar.bz2 |
added cron job for cleaning up associations
-rw-r--r-- | lib/openid_server.php | 2 | ||||
-rw-r--r-- | start.php | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/openid_server.php b/lib/openid_server.php index c689caf57..79ed064b4 100644 --- a/lib/openid_server.php +++ b/lib/openid_server.php @@ -1,6 +1,6 @@ <?php /** - * OpenID library loader for consumers + * OpenID library loader for servers */ $openid_path = dirname(dirname(__FILE__)) . '/vendors/php-openid/'; @@ -6,7 +6,17 @@ elgg_register_event_handler('init', 'system', 'openid_api_init'); function openid_api_init() { - $dir = elgg_get_plugins_path() . 'openid_api/lib/'; - elgg_register_library('openid_comsumer', "$dir/openid_consumer.php"); + $dir = elgg_get_plugins_path() . 'openid_api/lib'; + elgg_register_library('openid_consumer', "$dir/openid_consumer.php"); elgg_register_library('openid_server', "$dir/openid_server.php"); + + elgg_register_plugin_hook_handler('cron', 'daily', 'openid_api_cleanup'); +} + +/** + * Cleanup data related to the OpenID Elgg store for associations + */ +function openid_api_cleanup() { + $store = new OpenID_ElggStore(); + $store->cleanup(); } |