You are here

public function MobileNumberUtil::isTfaEnabled in Mobile Number 8

Same name and namespace in other branches
  1. 2.0.x src/MobileNumberUtil.php \Drupal\mobile_number\MobileNumberUtil::isTfaEnabled()

Checks if tfa is enabled.

Return value

bool True or false.

Overrides MobileNumberUtilInterface::isTfaEnabled

2 calls to MobileNumberUtil::isTfaEnabled()
MobileNumberUtil::getTfaField in src/MobileNumberUtil.php
Gets the tfa field configuration.
MobileNumberUtil::tfaAccountNumber in src/MobileNumberUtil.php
Gets account mobile number if tfa was enabled for the user.

File

src/MobileNumberUtil.php, line 422

Class

MobileNumberUtil
Turns a render array into a HTML string.

Namespace

Drupal\mobile_number

Code

public function isTfaEnabled() {
  return $this->configFactory
    ->get('tfa.settings')
    ->get('enabled') && $this
    ->isSmsEnabled();
}