diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:27:03 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:27:03 +0100 |
commit | 911d0021c374602c31e5bfd71b1cd8074f2c2293 (patch) | |
tree | 7e1d529b705e24906d69b9056d7980f0ebabc772 /mod/openid_api/start.php | |
parent | 5cc7f96262509b2a5d43fa6fbb6cd083064385be (diff) | |
parent | 33c206552a0cfd1166b2d5e4fcceb26f5ff1d224 (diff) | |
download | elgg-911d0021c374602c31e5bfd71b1cd8074f2c2293.tar.gz elgg-911d0021c374602c31e5bfd71b1cd8074f2c2293.tar.bz2 |
Add 'mod/openid_api/' from commit '33c206552a0cfd1166b2d5e4fcceb26f5ff1d224'
git-subtree-dir: mod/openid_api
git-subtree-mainline: 5cc7f96262509b2a5d43fa6fbb6cd083064385be
git-subtree-split: 33c206552a0cfd1166b2d5e4fcceb26f5ff1d224
Diffstat (limited to 'mod/openid_api/start.php')
-rw-r--r-- | mod/openid_api/start.php | 22 |
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(); +} |