Last change
on this file since 20293 was
20293,
checked in by mistic100, 11 years ago
|
first commit of oAuth plugin, still in developpement
|
File size:
583 bytes
|
Line | |
---|
1 | <?php |
---|
2 | defined('OAUTH_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | function load_hybridauth_conf() |
---|
5 | { |
---|
6 | global $hybridauth_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 | return true; |
---|
13 | } |
---|
14 | else |
---|
15 | { |
---|
16 | return false; |
---|
17 | } |
---|
18 | } |
---|
19 | |
---|
20 | function get_activated_providers() |
---|
21 | { |
---|
22 | global $hybridauth_conf; |
---|
23 | |
---|
24 | $out = array(); |
---|
25 | |
---|
26 | foreach ($hybridauth_conf['providers'] as $id => $data) |
---|
27 | { |
---|
28 | if ($data['enabled']) |
---|
29 | { |
---|
30 | $out[$id] = $data; |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | return $out; |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.