You are here

function GoogleAuthenticator::hasToken in Google Authenticator login 6

Same name and namespace in other branches
  1. 7 ga4php.php \GoogleAuthenticator::hasToken()

File

./ga4php.php, line 119

Class

GoogleAuthenticator

Code

function hasToken($username) {
  $token = $this
    ->internalGetData($username);

  // TODO: change this to a pattern match for an actual key
  if (!isset($token["tokenkey"])) {
    return false;
  }
  if ($token["tokenkey"] == "") {
    return false;
  }
  return true;
}