aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-15 18:27:58 -0500
committerCash Costello <cash.costello@gmail.com>2011-12-15 18:27:58 -0500
commit71ddd4172040b5603a4288ec07c78d7e70f997b7 (patch)
tree951b56b9c001950e1e02a6cba5122066702a629e /start.php
parent9f63c976f866a8a4981dee72c36d09448c6a5582 (diff)
downloadelgg-71ddd4172040b5603a4288ec07c78d7e70f997b7.tar.gz
elgg-71ddd4172040b5603a4288ec07c78d7e70f997b7.tar.bz2
added cron job for cleaning up associations
Diffstat (limited to 'start.php')
-rw-r--r--start.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/start.php b/start.php
index 09725ab17..2efb0a1d6 100644
--- a/start.php
+++ b/start.php
@@ -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();
}