SAAS-417: Disable Live Chat for Starter Plans

* Disable Live Chat for Starter Plans
This commit is contained in:
Albert Santoni 2014-03-21 14:30:41 -04:00
parent 3c40c6d627
commit efca227388
2 changed files with 22 additions and 2 deletions

View file

@ -1003,6 +1003,24 @@ class Application_Model_Preference
Logging::warn("Attempting to set client_id to invalid value: $id");
}
}
public static function GetLiveChatEnabled()
{
$liveChat = self::getValue("live_chat", false);
if (is_null($liveChat) || $liveChat == "" || $liveChat == "1") { //Defaults to on
return true;
}
return false;
}
public static function SetLiveChatEnabled($toggle)
{
if (is_bool($toggle)) {
self::setValue("live_chat", $toggle ? "1" : "0");
} else {
Logging::warn("Attempting to set live_chat to invalid value: $toggle. Must be a bool.");
}
}
/* User specific preferences start */