本文整理汇总了PHP中UserData::FromSystemId方法的典型用法代码示例。如果您正苦于以下问题:PHP UserData::FromSystemId方法的具体用法?PHP UserData::FromSystemId怎么用?PHP UserData::FromSystemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserData
的用法示例。
在下文中一共展示了UserData::FromSystemId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateMembers
function updateMembers($_dgroup = "")
{
global $USER;
Server::InitDataBlock(array("DBCONFIG"));
$groupname = addslashes(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->GetDescription($USER->Language));
foreach (Server::$Groups as $group) {
if ($group->IsDynamic && isset($group->Members[$USER->Browsers[0]->SystemId])) {
$_dgroup = $group->Descriptions["EN"];
foreach ($group->Members as $member => $persistent) {
if (true || $member != $USER->Browsers[0]->SystemId) {
$isOperator = false;
$isBusyAway = false;
if (!empty(Server::$Operators[$member])) {
$isOperator = true;
if (Server::$Operators[$member]->Status == USER_STATUS_OFFLINE) {
continue;
}
if (Server::$Operators[$member]->Status != USER_STATUS_ONLINE || Server::$Operators[$member]->IsBot) {
$isBusyAway = true;
}
$name = Server::$Operators[$member]->Fullname;
} else {
$data = UserData::FromSystemId($member);
$name = $data->Fullname;
if (empty($name)) {
$name = LocalizationManager::$TranslationStrings["client_guest"];
}
if ($member != $USER->Browsers[0]->SystemId) {
$chatobj = VisitorChat::GetBySystemId($member);
if (!($chatobj != null && !$chatobj->ExternalClosed && !$chatobj->InternalClosed)) {
continue;
}
}
}
$USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($member) . "','" . base64_encode($name) . "'," . To::BoolString($isOperator) . "," . To::BoolString($isBusyAway) . ",true);", false);
}
}
}
}
foreach ($USER->Browsers[0]->Members as $sysid => $chatm) {
if ($chatm->Status < 2 && empty($chatm->Declined) && Server::$Operators[$sysid]->Status != USER_STATUS_OFFLINE) {
$USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($sysid) . "','" . base64_encode(Server::$Operators[$sysid]->Fullname) . "',true," . To::BoolString(Server::$Operators[$sysid]->Status != USER_STATUS_ONLINE) . ",false);", false);
}
}
$fb = !empty(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->ChatFunctions[3]) && !empty(Server::$Configuration->Database["gl_fb"]);
$USER->AddFunctionCall("lz_chat_set_host(\"" . base64_encode(Server::$Operators[$USER->Browsers[0]->OperatorId]->UserId) . "\",\"" . base64_encode(addslashes(Server::$Operators[$USER->Browsers[0]->OperatorId]->Fullname)) . "\",\"" . base64_encode($groupname) . "\",\"" . strtolower(Server::$Operators[$USER->Browsers[0]->OperatorId]->Language) . "\"," . To::BoolString(Server::$Operators[$USER->Browsers[0]->OperatorId]->Typing == $USER->Browsers[0]->SystemId) . "," . To::BoolString(!empty(Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile) && Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile->Public) . ",\"" . base64_encode($_dgroup) . "\"," . To::BoolString($fb) . ");", false);
}