Last change
on this file since 26619 was
26619,
checked in by mistic100, 10 years ago
|
move "oauth_id" field to user + display 16px icon on users list
|
File size:
1.1 KB
|
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 | } |
---|
32 | else |
---|
33 | { |
---|
34 | $provider = ''; |
---|
35 | } |
---|
36 | |
---|
37 | $user[$username_col] = '<span class="oauth_16px '.strtolower($provider).'" title="'. @$hybridauth_conf['providers'][$provider]['name'] .'"></span> |
---|
38 | ' . $user[$username_col]; |
---|
39 | unset($user[$oauth_col]); |
---|
40 | } |
---|
41 | unset($user); |
---|
42 | |
---|
43 | return $output; |
---|
44 | } |
---|
45 | |
---|
46 | function oauth_user_list() |
---|
47 | { |
---|
48 | global $template, $page; |
---|
49 | |
---|
50 | if ($page['page'] != 'user_list') |
---|
51 | { |
---|
52 | return; |
---|
53 | } |
---|
54 | |
---|
55 | $template->func_combine_css(array('path' => OAUTH_PATH . 'template/oauth_sprites.css')); |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.