Skip to content

Commit 779cda7

Browse files
committed
add getEnabledProviders
1 parent ad85f5d commit 779cda7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Ubiquity/client/oauth/OAuthAdmin.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ public static function getAvailableProviders() {
186186
return $providers;
187187
}
188188

189+
/**
190+
*
191+
* @return array
192+
*/
193+
public static function getEnabledProviders() {
194+
$result = [];
195+
$actualProviders = self::loadProvidersConfig();
196+
foreach ($actualProviders as $name => $config) {
197+
if (isset($config['enabled']) && $config['enabled'] === true) {
198+
$result[] = $name;
199+
}
200+
}
201+
return $result;
202+
}
203+
189204
/**
190205
*
191206
* @return array

0 commit comments

Comments
 (0)