SAAS-417: Disable Live Chat for Starter Plans
* Disable Live Chat for Starter Plans
This commit is contained in:
parent
3c40c6d627
commit
efca227388
2 changed files with 22 additions and 2 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue