aboutsummaryrefslogtreecommitdiff
path: root/mod/openid_api/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/openid_api/start.php')
-rw-r--r--mod/openid_api/start.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/openid_api/start.php b/mod/openid_api/start.php
new file mode 100644
index 000000000..2efb0a1d6
--- /dev/null
+++ b/mod/openid_api/start.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * OpenID API Library
+ */
+
+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_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();
+}