當前位置: 首頁>>代碼示例>>PHP>>正文


PHP erLhcoreClassUserDep::getDefaultUserDepartment方法代碼示例

本文整理匯總了PHP中erLhcoreClassUserDep::getDefaultUserDepartment方法的典型用法代碼示例。如果您正苦於以下問題:PHP erLhcoreClassUserDep::getDefaultUserDepartment方法的具體用法?PHP erLhcoreClassUserDep::getDefaultUserDepartment怎麽用?PHP erLhcoreClassUserDep::getDefaultUserDepartment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在erLhcoreClassUserDep的用法示例。


在下文中一共展示了erLhcoreClassUserDep::getDefaultUserDepartment方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: htmlspecialchars_decode

    $chat->status_sub = erLhcoreClassModelChat::STATUS_SUB_OWNER_CHANGED;
    $chat->user_typing_txt = (string) $chat->user . ' ' . htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/accepttrasnfer', 'has joined the chat!'), ENT_QUOTES);
    $chat->user_typing = time();
    // Change department if user cannot read current department, so chat appears in right menu
    $filter = erLhcoreClassUserDep::parseUserDepartmetnsForFilter($currentUser->getUserID());
    if ($filter !== true && !in_array($chat->dep_id, $filter)) {
        $dep_id = erLhcoreClassUserDep::getDefaultUserDepartment();
        if ($dep_id > 0) {
            $chat->dep_id = $dep_id;
            $chat->status_sub = erLhcoreClassModelChat::STATUS_SUB_OWNER_CHANGED;
        }
    }
}
if (!erLhcoreClassChat::hasAccessToRead($chat)) {
    if ($currentUser->getUserID() == $chatTransfer->transfer_to_user_id) {
        $dep_id = erLhcoreClassUserDep::getDefaultUserDepartment();
        if ($dep_id > 0) {
            $chat->dep_id = $dep_id;
            $chat->status_sub = erLhcoreClassModelChat::STATUS_SUB_OWNER_CHANGED;
        }
    } else {
        exit;
        // User does not have permission to assign chat to himself
    }
}
// All ok, we can make changes
erLhcoreClassChat::getSession()->update($chat);
erLhcoreClassTransfer::getSession()->delete($chatTransfer);
if ($Params['user_parameters_unordered']['postaction'] == 'singlewindow') {
    erLhcoreClassModule::redirect('chat/single/' . $chat->id);
    exit;
開發者ID:sudogitguy,項目名稱:livehelperchat,代碼行數:31,代碼來源:accepttransfer.php


注:本文中的erLhcoreClassUserDep::getDefaultUserDepartment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。