function GoogleAuthenticator::setTokenType in Google Authenticator login 6
Same name and namespace in other branches
- 7 ga4php.php \GoogleAuthenticator::setTokenType()
File
- ./
ga4php.php, line 86
Class
Code
function setTokenType($username, $tokentype) {
$tokentype = strtoupper($tokentype);
if ($tokentype != "HOTP" && $tokentype != "TOTP") {
$this->errorText = "Invalid Token Type";
return false;
}
$data = $this
->internalGetData($username);
$data["tokentype"] = $tokentype;
return $this
->internalPutData($username, $data);
}