/** * Returns whether or not the license key is valid. * @param string $licenseKey * @param string $localKey * @return boolean */ public static function VerifyLicense($licenseKey, $localKey = null) { $dataRegistry = new XenForo_Model_DataRegistry(); if (XenForo_Application::getOptions()->simpleFormsLicenseKey == $licenseKey) { $localKey = $dataRegistry->get('lpsf_localkey'); } if ($licenseKey != '') { $licenseCheck = self::_checkLicense($licenseKey, $localKey); if (array_key_exists('status', $licenseCheck) && $licenseCheck['status'] == 'Active') { if (array_key_exists('localkey', $licenseCheck) && $localKey != $licenseCheck['localkey']) { $dataRegistry->set('lpsf_localkey', $licenseCheck['localkey']); } return true; } } return false; }