1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Show only enabled providers on the account link screen

Summary:
Ref T1536. Above, we load all providers, which is intentional (if a user has a link with a previously-enabled but now-disabled provider, we should enrich it with provider information).

However, before showing linking options we should drop disabled providers.

Test Plan: Disabled Disqus, reloaded, didn't see Disqus anymore.

Reviewers: mbishopim3

Reviewed By: mbishopim3

CC: aran

Maniphest Tasks: T1536

Differential Revision: https://secure.phabricator.com/D6219
This commit is contained in:
epriestley 2013-06-17 13:58:24 -07:00
parent c0cc7bbfdf
commit ad8fe93cc7

View file

@ -104,6 +104,8 @@ final class PhabricatorSettingsPanelExternalAccounts
pht('Your account is linked with all available providers.'));
$accounts = mpull($accounts, null, 'getProviderKey');
$providers = PhabricatorAuthProvider::getAllEnabledProviders();
$providers = msort($providers, 'getProviderName');
foreach ($providers as $key => $provider) {
if (isset($accounts[$key])) {