verifyCode($otaSecret, $otaCode, 2); // 2 = 2*30sec clock tolerance if ($checkResult) { UserManager::setOta($otaCode, $otaSecret); } header('Location: ' . BASEDIR . 'setting'); die(); } }