Line | |
---|
1 | <?php |
---|
2 | defined('OAUTH_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | function load_hybridauth_conf() |
---|
5 | { |
---|
6 | global $hybridauth_conf, $conf; |
---|
7 | |
---|
8 | if (file_exists(PHPWG_ROOT_PATH.OAUTH_CONFIG)) |
---|
9 | { |
---|
10 | $hybridauth_conf = include(PHPWG_ROOT_PATH.OAUTH_CONFIG); |
---|
11 | $hybridauth_conf['base_url'] = OAUTH_PUBLIC; |
---|
12 | if (!empty($conf['oauth_debug_file'])) |
---|
13 | { |
---|
14 | $hybridauth_conf['debug_mode'] = true; |
---|
15 | $hybridauth_conf['debug_file'] = $conf['oauth_debug_file']; |
---|
16 | } |
---|
17 | return true; |
---|
18 | } |
---|
19 | else |
---|
20 | { |
---|
21 | return false; |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | function get_activated_providers() |
---|
26 | { |
---|
27 | global $hybridauth_conf; |
---|
28 | |
---|
29 | $out = array(); |
---|
30 | |
---|
31 | foreach ($hybridauth_conf['providers'] as $id => $data) |
---|
32 | { |
---|
33 | if ($data['enabled']) |
---|
34 | { |
---|
35 | $out[$id] = $data; |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | return $out; |
---|
40 | } |
---|
41 | |
---|
42 | |
---|
43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.