aboutsummaryrefslogtreecommitdiff
path: root/start.php
blob: 2efb0a1d6bc74741cb82ffaefcc8ef3f01d84660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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();
}