function ga_loginGA::unapprovedUser in Google Authenticator login 6
File
- ./
ga_login.class.php, line 75
Class
Code
function unapprovedUser($username, $ttype = "HOTP", $key = "", $hexkey = "") {
$ttype = strtoupper($ttype);
if ($ttype != "HOTP" && $ttype != "TOTP") {
return false;
}
if ($hexkey != "") {
$hkey = $hexkey;
}
else {
if ($key == "") {
$key = $this
->createBase32Key();
}
$hkey = $this
->helperb322hex($key);
}
$token = $this
->internalGetData($username);
$token["tokenkey"] = $hkey;
$token["tokentype"] = $ttype;
return $token;
}