Rev 801 | Rev 1008 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 801 | Rev 1000 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | public function tree_search($request) { |
62 | public function tree_search($request) { |
63 | return false; |
63 | return false; |
64 | } |
64 | } |
65 | 65 | ||
66 | public function implementsFeature($id) { |
66 | public function implementsFeature($id) { |
67 | if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.5') return true; // alternativeLoginMethods |
67 | if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.5') return true; // alternativeLoginMethods() |
- | 68 | if (strtolower($id) == '1.3.6.1.4.1.37476.2.5.2.3.8') return true; // getNotifications() |
|
68 | return false; |
69 | return false; |
69 | } |
70 | } |
70 | 71 | ||
71 | public function alternativeLoginMethods() { |
72 | public function alternativeLoginMethods() { |
- | 73 | // Interface 1.3.6.1.4.1.37476.2.5.2.3.5 |
|
72 | $logins = array(); |
74 | $logins = array(); |
73 | if (OIDplus::baseConfig()->getValue('FACEBOOK_OAUTH2_ENABLED', false)) { |
75 | if (OIDplus::baseConfig()->getValue('FACEBOOK_OAUTH2_ENABLED', false)) { |
74 | $logins[] = array( |
76 | $logins[] = array( |
75 | 'oidplus:login_facebook', |
77 | 'oidplus:login_facebook', |
76 | _L('Login using Facebook'), |
78 | _L('Login using Facebook'), |
77 | OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png' |
79 | OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png' |
78 | ); |
80 | ); |
79 | } |
81 | } |
80 | return $logins; |
82 | return $logins; |
81 | } |
83 | } |
- | 84 | ||
- | 85 | public function getNotifications($user=null): array { |
|
- | 86 | // Interface 1.3.6.1.4.1.37476.2.5.2.3.8 |
|
- | 87 | $notifications = array(); |
|
- | 88 | if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) { |
|
- | 89 | if (OIDplus::baseConfig()->getValue('FACEBOOK_OAUTH2_ENABLED', false)) { |
|
- | 90 | if (!function_exists('curl_init')) { |
|
- | 91 | $title = _L('Facebook OAuth Login'); |
|
- | 92 | $notifications[] = array('ERR', _L('OIDplus plugin "%1" is enabled, but required PHP extension "%2" is not installed.', $title, 'php_curl')); |
|
- | 93 | } |
|
- | 94 | } |
|
- | 95 | } |
|
- | 96 | return $notifications; |
|
- | 97 | } |
|
- | 98 | ||
82 | } |
99 | } |