You are here

public function TfaTrustedBrowserSetup::getTrustedBrowsers in Two-factor Authentication (TFA) 8

Get list of trusted browsers.

Return value

array List of current trusted browsers.

2 calls to TfaTrustedBrowserSetup::getTrustedBrowsers()
TfaTrustedBrowserSetup::getOverview in src/Plugin/TfaSetup/TfaTrustedBrowserSetup.php
Plugin overview page.
TfaTrustedBrowserSetup::getSetupForm in src/Plugin/TfaSetup/TfaTrustedBrowserSetup.php
Get the setup form for the validation method.

File

src/Plugin/TfaSetup/TfaTrustedBrowserSetup.php, line 162

Class

TfaTrustedBrowserSetup
TFA Trusted Browser Setup Plugin.

Namespace

Drupal\tfa\Plugin\TfaSetup

Code

public function getTrustedBrowsers() {
  return $this
    ->getUserData('tfa', 'tfa_trusted_browser', $this->uid, $this->userData) ?: [];
}