Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / auth / management / PhabricatorAuthManagementListMFAProvidersWorkflow.php
blob8121bf955f1c1bfaf84e7da07823078b411f4e78
1 <?php
3 final class PhabricatorAuthManagementListMFAProvidersWorkflow
4 extends PhabricatorAuthManagementWorkflow {
6 protected function didConstruct() {
7 $this
8 ->setName('list-mfa-providers')
9 ->setExamples('**list-mfa-providerrs**')
10 ->setSynopsis(
11 pht(
12 'List available multi-factor authentication providers.'))
13 ->setArguments(array());
16 public function execute(PhutilArgumentParser $args) {
17 $viewer = $this->getViewer();
19 $providers = id(new PhabricatorAuthFactorProviderQuery())
20 ->setViewer($viewer)
21 ->execute();
23 foreach ($providers as $provider) {
24 echo tsprintf(
25 "%s\t%s\n",
26 $provider->getPHID(),
27 $provider->getDisplayName());
30 return 0;