aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/openid_server.php2
-rw-r--r--start.php14
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/';
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();
}