You are here

public function MobileNumberTfa::begin in Mobile Number 7

Begin TFA process.

Overrides TfaSendPluginInterface::begin

File

src/MobileNumberTfa.php, line 63
Contains MobileNumberTfa.

Class

MobileNumberTfa
Class MobileNumberTfa is a validation and sending plugin for TFA.

Code

public function begin() {
  if (!$this->code) {
    if (!$this
      ->sendCode()) {
      drupal_set_message(t('Unable to deliver the code. Please contact support.'), 'error');
    }
  }
}