Line | |
---|
1 | <?php |
---|
2 | defined('OAUTH_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | function oauth_admin_plugin_menu_links($menu) |
---|
5 | { |
---|
6 | $menu[] = array( |
---|
7 | 'NAME' => 'Social Connect', |
---|
8 | 'URL' => OAUTH_ADMIN, |
---|
9 | ); |
---|
10 | return $menu; |
---|
11 | } |
---|
12 | |
---|
13 | function oauth_user_list_columns($aColumns) |
---|
14 | { |
---|
15 | $aColumns[] ='oauth_id'; |
---|
16 | return $aColumns; |
---|
17 | } |
---|
18 | |
---|
19 | function oauth_user_list_render($output) |
---|
20 | { |
---|
21 | global $aColumns, $hybridauth_conf; |
---|
22 | |
---|
23 | $oauth_col = array_search('oauth_id', $aColumns); |
---|
24 | $username_col = array_search('username', $aColumns); |
---|
25 | |
---|
26 | foreach ($output['aaData'] as &$user) |
---|
27 | { |
---|
28 | if (!empty($user[$oauth_col])) |
---|
29 | { |
---|
30 | list($provider) = explode('---', $user[$oauth_col], 2); |
---|
31 | $user[$username_col] = '<span class="oauth_16px '.strtolower($provider).'" title="'. $hybridauth_conf['providers'][$provider]['name'] .'"></span> |
---|
32 | ' . $user[$username_col]; |
---|
33 | } |
---|
34 | |
---|
35 | unset($user[$oauth_col]); |
---|
36 | } |
---|
37 | unset($user); |
---|
38 | |
---|
39 | return $output; |
---|
40 | } |
---|
41 | |
---|
42 | function oauth_user_list() |
---|
43 | { |
---|
44 | global $template, $page; |
---|
45 | |
---|
46 | if ($page['page'] != 'user_list') |
---|
47 | { |
---|
48 | return; |
---|
49 | } |
---|
50 | |
---|
51 | $template->func_combine_css(array('path' => OAUTH_PATH . 'template/oauth_sprites.css')); |
---|
52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.