You are here

public function MobileNumber::getToken in Mobile Number 7

Gets token generated if verification code was sent.

Return value

string|NULL A drupal token (43 characters).

Overrides MobileNumberInterface::getToken

1 call to MobileNumber::getToken()
MobileNumber::verifyCode in src/MobileNumber.php
Verifies input code matches code sent to user.

File

src/MobileNumber.php, line 204

Class

MobileNumber
Class MobileNumber handles mobile number validation and verification.

Code

public function getToken() {
  if (!empty($_SESSION['mobile_number_verification'][$this->callableNumber]['token'])) {
    return $_SESSION['mobile_number_verification'][$this->callableNumber]['token'];
  }
  return NULL;
}