In a similar fashion to the core tables ModuleSettings and TabModuleSettings which store data as key/value pairs, the DotNetNuke framework provides the core PortalSettings table. In the class DotNetNuke.Entities.Portals.PortalController you will find static methods to save and retrieve developer defined portal-wide settings. These methods include:
public static void UpdatePortalSetting(int portalID, string settingName, string settingValue)
public static string GetPortalSetting(string settingName, int portalID, string defaultValue)
Unlike the methods for retrieving ModuleSettings or TabModuleSettings, the PortalSettings methods also include a couple that are strongly typed for boolean and integer values:
public static bool GetPortalSettingAsBoolean(string key, int portalID, bool defaultValue)
public static int GetPortalSettingAsInteger(string key, int portalID, int defaultValue)
One point of caution . . . unlike ModuleSettings and TabModuleSettings which are also keyed on your specific ModuleId or TabModuleId, the PortalSettings are truly portal wide so be sure to use a unique settingName such as "WESNet_ByInvitation_UseCaptcha" to avoid conflicts with core and other developer's setting names.