当前位置: 首页>>代码示例>>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;未经允许,请勿转载。