本文整理汇总了PHP中erLhcoreClassUser类的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassUser类的具体用法?PHP erLhcoreClassUser怎么用?PHP erLhcoreClassUser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了erLhcoreClassUser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __get
public function __get($var)
{
switch ($var) {
case 'left_menu':
$this->left_menu = '';
return $this->left_menu;
break;
case 'content_rendered':
return erLhcoreClassFormRenderer::renderForm($this);
break;
case 'xls_columns_data':
$parts = explode('||', $this->xls_columns);
$totalParts = array();
foreach ($parts as $part) {
$subParts = explode(';', $part);
$dataParts = array();
foreach ($subParts as $subPart) {
$data = explode('=', $subPart);
$dataParts[$data[0]] = $data[1];
}
$totalParts[] = $dataParts;
}
return $this->xls_columns_data = $totalParts;
break;
case 'hide_delete':
return $this->hide_delete = !erLhcoreClassUser::instance()->hasAccessTo('lhform', 'delete_fm');
break;
default:
break;
}
}
示例2: getList
public static function getList($paramsSearch = array())
{
$paramsDefault = array('limit' => 32, 'offset' => 0);
$params = array_merge($paramsDefault, $paramsSearch);
$session = erLhcoreClassUser::getSession();
$q = $session->createFindQuery('erLhcoreClassModelUserSetting');
$conditions = array();
if (isset($params['filter']) && count($params['filter']) > 0) {
foreach ($params['filter'] as $field => $fieldValue) {
$conditions[] = $q->expr->eq($field, $q->bindValue($fieldValue));
}
}
if (isset($params['filterin']) && count($params['filterin']) > 0) {
foreach ($params['filterin'] as $field => $fieldValue) {
$conditions[] = $q->expr->in($field, $fieldValue);
}
}
if (isset($params['filterlt']) && count($params['filterlt']) > 0) {
foreach ($params['filterlt'] as $field => $fieldValue) {
$conditions[] = $q->expr->lt($field, $q->bindValue($fieldValue));
}
}
if (isset($params['filtergt']) && count($params['filtergt']) > 0) {
foreach ($params['filtergt'] as $field => $fieldValue) {
$conditions[] = $q->expr->gt($field, $q->bindValue($fieldValue));
}
}
if (count($conditions) > 0) {
$q->where($conditions);
}
$q->limit($params['limit'], $params['offset']);
$q->orderBy(isset($params['sort']) ? $params['sort'] : 'identifier DESC');
$objects = $session->find($q, 'erLhcoreClassModelUserSettingOption');
return $objects;
}
示例3: getTransferChats
public static function getTransferChats($params = array())
{
$db = ezcDbInstance::get();
$currentUser = erLhcoreClassUser::instance();
$limitationSQL = '';
if (isset($params['department_transfers']) && $params['department_transfers'] == true) {
$limitation = self::getDepartmentLimitation();
// Does not have any assigned department
if ($limitation === false) {
return array();
}
if ($limitation !== true) {
$limitationSQL = ' AND ' . $limitation;
}
$stmt = $db->prepare('SELECT lh_chat.*,lh_transfer.id as transfer_id FROM lh_chat INNER JOIN lh_transfer ON lh_transfer.chat_id = lh_chat.id WHERE transfer_user_id != :transfer_user_id ' . $limitationSQL . ' ORDER BY lh_transfer.id DESC');
$stmt->bindValue(':transfer_user_id', $currentUser->getUserID());
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$stmt->execute();
$rows = $stmt->fetchAll();
} else {
$stmt = $db->prepare('SELECT lh_chat.*,lh_transfer.id as transfer_id FROM lh_chat INNER JOIN lh_transfer ON lh_transfer.chat_id = lh_chat.id WHERE lh_transfer.transfer_to_user_id = :user_id ORDER BY lh_transfer.id DESC');
$stmt->bindValue(':user_id', $currentUser->getUserID());
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$stmt->execute();
$rows = $stmt->fetchAll();
}
return $rows;
}
示例4: validateAdminTheme
public static function validateAdminTheme(erLhAbstractModelAdminTheme &$clickform)
{
$definition = array('Name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'header_content' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'header_css' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'static_content_name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'static_content_hash' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'static_js_content_name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'static_js_content_hash' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'static_css_content_name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'static_css_content_hash' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY));
$form = new ezcInputForm(INPUT_POST, $definition);
$Errors = array();
$currentUser = erLhcoreClassUser::instance();
if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
$Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('icclicktocallform/form', 'Invalid CSRF token!');
}
if (!$form->hasValidData('Name') || $form->Name == '') {
$Errors['Name'] = erTranslationClassLhTranslation::getInstance()->getTranslation('icclicktocallform/form', 'Please enter a name');
} else {
$clickform->name = $form->Name;
}
if ($form->hasValidData('header_content')) {
$clickform->header_content = $form->header_content;
}
if ($form->hasValidData('header_css')) {
$clickform->header_css = $form->header_css;
}
$resourcesArray = array('static_content', 'static_js_content', 'static_css_content');
$supportedExtensions = array('zip', 'doc', 'docx', 'ttf', 'pdf', 'xls', 'ico', 'gif', 'xlsx', 'jpg', 'jpeg', 'png', 'bmp', 'rar', '7z', 'css', 'js', 'eot', 'woff', 'woff2', 'svg');
// Validate resources
foreach ($resourcesArray as $resource) {
if ($form->hasValidData($resource . '_hash') && !empty($form->{$resource . '_hash'})) {
$customFields = $currentStaticResources = $clickform->{$resource . '_array'};
foreach ($form->{$resource . '_hash'} as $key => $customFieldType) {
if (!erLhcoreClassSearchHandler::isFile($resource . '_file_' . $key, $supportedExtensions) && !isset($currentStaticResources[$key]['file'])) {
$Errors[$resource . '_file_' . $key] = erTranslationClassLhTranslation::getInstance()->getTranslation('icclicktocallform/form', 'File not chosen for') . (isset($form->{$resource . '_name'}[$key]) ? ' - ' . htmlspecialchars($form->{$resource . '_name'}[$key]) : '');
}
}
// If there is no errors upload files
if (empty($Errors)) {
foreach ($form->{$resource . '_hash'} as $key => $customFieldType) {
$customFields[$key]['name'] = $form->{$resource . '_name'}[$key];
$customFields[$key]['hash'] = $key;
if (erLhcoreClassSearchHandler::isFile($resource . '_file_' . $key, $supportedExtensions)) {
// Check there is already uploaded file and remove it
$clickform->removeResource($resource, $key);
// Store new file if required
$dir = 'var/storageadmintheme/' . date('Y') . 'y/' . date('m') . '/' . date('d') . '/' . $clickform->id . '/';
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('admintheme.filedir', array('dir' => &$dir, 'storage_id' => $clickform->id));
erLhcoreClassFileUpload::mkdirRecursive($dir);
$customFields[$key]['file'] = erLhcoreClassSearchHandler::moveUploadedFile($resource . '_file_' . $key, $dir . '/', '.');
$customFields[$key]['file_dir'] = $dir;
}
}
$clickform->{$resource} = json_encode($customFields, JSON_HEX_APOS);
}
} else {
$clickform->{$resource} = '';
}
}
return $Errors;
}
示例5: deleteGroup
public static function deleteGroup($group_id)
{
$Group = erLhcoreClassUser::getSession()->load('erLhcoreClassModelGroup', $group_id);
erLhcoreClassUser::getSession()->delete($Group);
$q = ezcDbInstance::get()->createDeleteQuery();
// Transfered chats to user
$q->deleteFrom('lh_groupuser')->where($q->expr->eq('group_id', $group_id));
$stmt = $q->prepare();
$stmt->execute();
// Transfered chats to user
$q->deleteFrom('lh_grouprole')->where($q->expr->eq('group_id', $group_id));
$stmt = $q->prepare();
$stmt->execute();
}
示例6: prepareSendMail
public static function prepareSendMail(erLhAbstractModelEmailTemplate &$sendMail)
{
$currentUser = erLhcoreClassUser::instance();
if ($currentUser->isLogged() == true) {
$userData = $currentUser->getUserData();
$sendMail->subject = str_replace(array('{name_surname}'), array($userData->name . ' ' . $userData->surname), $sendMail->subject);
$sendMail->from_name = str_replace(array('{name_surname}'), array($userData->name . ' ' . $userData->surname), $sendMail->from_name);
if (empty($sendMail->from_email)) {
$sendMail->from_email = $userData->email;
}
if (empty($sendMail->reply_to)) {
$sendMail->reply_to = $userData->email;
}
}
}
示例7: getCount
public static function getCount($params = array())
{
$session = erLhcoreClassUser::getSession('slave');
$q = $session->database->createSelectQuery();
$q->select("COUNT(id)")->from("lh_group");
if (isset($params['filter']) && count($params['filter']) > 0) {
$conditions = array();
foreach ($params['filter'] as $field => $fieldValue) {
$conditions[] = $q->expr->eq($field, $q->bindValue($fieldValue));
}
$q->where($conditions);
}
$stmt = $q->prepare();
$stmt->execute();
$result = $stmt->fetchColumn();
return $result;
}
示例8: addUserDepartaments
public static function addUserDepartaments($Departaments, $userID = false, $UserData = false)
{
$db = ezcDbInstance::get();
if ($userID === false) {
$currentUser = erLhcoreClassUser::instance();
$userID = $currentUser->getUserID();
}
$stmt = $db->prepare('DELETE FROM lh_userdep WHERE user_id = :user_id AND type = 0');
$stmt->bindValue(':user_id', $userID);
$stmt->execute();
foreach ($Departaments as $DepartamentID) {
$stmt = $db->prepare('INSERT INTO lh_userdep (user_id,dep_id,hide_online,last_activity,last_accepted,active_chats,type,dep_group_id) VALUES (:user_id,:dep_id,:hide_online,0,0,:active_chats,0,0)');
$stmt->bindValue(':user_id', $userID);
$stmt->bindValue(':dep_id', $DepartamentID);
$stmt->bindValue(':hide_online', $UserData->hide_online);
$stmt->bindValue(':active_chats', erLhcoreClassChat::getCount(array('filter' => array('user_id' => $UserData->id, 'status' => erLhcoreClassModelChat::STATUS_ACTIVE_CHAT))));
$stmt->execute();
}
if (isset($_SESSION['lhCacheUserDepartaments_' . $userID])) {
unset($_SESSION['lhCacheUserDepartaments_' . $userID]);
}
}
示例9: loginBySSO
public static function loginBySSO($params)
{
$settings = (include 'extension/singlesignon/settings/settings.ini.php');
// Try to find operator by our logins
if (isset($params[$settings['attr_map']['username']][0])) {
$username = $params[$settings['attr_map']['username']][0];
if (erLhcoreClassModelUser::userExists($username)) {
$user = array_shift(erLhcoreClassModelUser::getUserList(array('limit' => 1, 'filter' => array('username'))));
erLhcoreClassUser::instance()->setLoggedUser($user->id);
} else {
$user = new erLhcoreClassModelUser();
foreach ($settings['attr_map'] as $attr => $ssoAttr) {
$user->{$attr} = $params[$settings['attr_map'][$attr]][0];
}
foreach ($settings['default_attributes'] as $attr => $value) {
$user->{$attr} = $value;
}
$user->password = sha1(erLhcoreClassModelForgotPassword::randomPassword() . rand(0, 1000) . microtime());
$user->saveThis();
// Set that users sees all pending chats
erLhcoreClassModelUserSetting::setSetting('show_all_pending', 1, $user->id);
// Set default departments
erLhcoreClassUserDep::addUserDepartaments($settings['default_departments'], $user->id, $user);
// Cleanup if previously existed
erLhcoreClassModelGroupUser::removeUserFromGroups($user->id);
// Assign user to default group
foreach ($settings['default_user_groups'] as $group_id) {
$groupUser = new erLhcoreClassModelGroupUser();
$groupUser->group_id = $group_id;
$groupUser->user_id = $user->id;
$groupUser->saveThis();
}
erLhcoreClassUser::instance()->setLoggedUser($user->id);
}
return true;
} else {
throw new Exception('Username field not found');
}
}
示例10: echo
echo (int) ($soundData['chat_message_sinterval'] * 1000);
?>
;confLH.new_chat_sound_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('new_chat_sound', (int) $soundData['new_chat_sound_enabled']);
?>
;confLH.new_message_sound_admin_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('chat_message', (int) $soundData['new_message_sound_admin_enabled']);
?>
;confLH.new_message_sound_user_enabled = <?php
echo (int) erLhcoreClassModelUserSetting::getSetting('chat_message', (int) $soundData['new_message_sound_user_enabled']);
?>
;confLH.new_message_browser_notification = <?php
echo isset($soundData['browser_notification_message']) ? (int) $soundData['browser_notification_message'] : 0;
?>
;confLH.transLation = {'new_chat':'New chat request'};confLH.csrf_token = '<?php
echo erLhcoreClassUser::instance()->getCSFRToken();
?>
';confLH.repeat_sound = <?php
echo (int) $soundData['repeat_sound'];
?>
;confLH.repeat_sound_delay = <?php
echo (int) $soundData['repeat_sound_delay'];
?>
;confLH.show_alert = <?php
echo (int) $soundData['show_alert'];
?>
;</script><script type="text/javascript" src="/north-american-nemesis-new/chattool/cache/compiledtemplates/4079b29f9b336083f1a058bab4e0ccbb.js"></script><?php
echo isset($Result['additional_header_js']) ? $Result['additional_header_js'] : '';
?>
</head><body><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><span><a href="/north-american-nemesis-new/chattool/index.php/site_admin/" title="Home"><img src="/north-american-nemesis-new/chattool/design/defaulttheme/images/general/logo.png" alt="demox user chat" title="demox user chat"></a></span></div><div class="modal-body"><?php
echo $Result['content'];
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:500733b9b91c99814e3e4d967c2043b3.php
示例11:
<?php
include erLhcoreClassDesign::designtpl('lhchat/chat_tabs/chat_translation_pre.tpl.php');
if ($chat_translation_enabled == true && erLhcoreClassUser::instance()->hasAccessTo('lhtranslation', 'use')) {
?>
<?php
// This values comes from tab template
if ($dataChatTranslation['enable_translations'] && $dataChatTranslation['enable_translations'] == true) {
?>
<div role="tabpanel" class="tab-pane" id="main-user-info-translation-<?php
echo $chat->id;
?>
">
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/translation', 'Visitor language');
?>
</label>
<?php
echo erLhcoreClassRenderHelper::renderCombobox(array('input_name' => 'chat_locale_' . $chat->id, 'optional_field' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/translation', 'Automatically detected'), 'selected_id' => $chat->chat_locale, 'css_class' => 'form-control', 'list_function' => 'erLhcoreClassTranslate::getSupportedLanguages'));
?>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/translation', 'My language');
?>
示例12: htmlspecialchars
<?php
$currentUser = erLhcoreClassUser::instance();
$UserData = $currentUser->getUserData(true);
?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?php
echo htmlspecialchars($UserData->name), ' ', htmlspecialchars($UserData->surname);
?>
<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="<?php
echo erLhcoreClassDesign::baseurl('user/account');
?>
" title="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Account');
?>
"><i class="glyphicon glyphicon-user"></i> <?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Account');
?>
</a></li>
<li><a href="<?php
echo erLhcoreClassDesign::baseurl('user/logout');
?>
" title="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Logout');
?>
"><i class="glyphicon glyphicon-log-out"></i> <?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Logout');
?>
</a></li>
示例13:
<h1><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'Form');
?>
</h1>
<ul class="circle small-list">
<li><a href="<?php
echo erLhcoreClassDesign::baseurl('abstract/list');
?>
/Form"><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'List of forms');
?>
</a></li>
<?php
if (erLhcoreClassUser::instance()->hasAccessTo('lhform', 'generate_js')) {
?>
<li><a href="<?php
echo erLhcoreClassDesign::baseurl('form/embedcode');
?>
"><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'Page embed code');
?>
</a></li>
<?php
}
?>
</ul>
示例14: elseif
?>
<?php
} elseif ($tabItem == 'operator_remarks_tab') {
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/chat_tabs/operator_remarks_tab.tpl.php');
?>
<?php
} elseif ($tabItem == 'information_tab_user_files_tab') {
?>
<?php
$fileData = (array) erLhcoreClassModelChatConfig::fetch('file_configuration')->data;
?>
<?php
if (isset($fileData['active_admin_upload']) && $fileData['active_admin_upload'] == true && erLhcoreClassUser::instance()->hasAccessTo('lhfile', 'use_operator')) {
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/chat_tabs/information_tab_user_files_tab.tpl.php');
?>
<?php
}
?>
<?php
} elseif ($tabItem == 'operator_screenshot_tab') {
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/chat_tabs/operator_screenshot_tab.tpl.php');
?>
<?php
示例15: VALUES
$db->query("INSERT INTO `lh_userdep` (`user_id`,`dep_id`,`last_activity`,`hide_online`,`last_accepted`,`active_chats`) VALUES ({$UserData->id},0,0,0,0,0)");
// Transfer chat
$db->query("CREATE TABLE IF NOT EXISTS `lh_transfer` (\n\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t `chat_id` int(11) NOT NULL,\n\t\t\t\t `dep_id` int(11) NOT NULL,\n\t\t\t\t `transfer_user_id` int(11) NOT NULL,\n\t\t\t\t `from_dep_id` int(11) NOT NULL,\n\t\t\t\t `transfer_to_user_id` int(11) NOT NULL,\n\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t KEY `dep_id` (`dep_id`),\n\t\t\t\t KEY `transfer_user_id_dep_id` (`transfer_user_id`,`dep_id`),\n\t\t\t\t KEY `transfer_to_user_id` (`transfer_to_user_id`)\n\t\t\t\t) DEFAULT CHARSET=utf8;");
// Remember user table
$db->query("CREATE TABLE IF NOT EXISTS `lh_users_remember` (\n\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t `user_id` int(11) NOT NULL,\n\t\t\t\t `mtime` int(11) NOT NULL,\n\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t) DEFAULT CHARSET=utf8;");
// Chat messages
$db->query("CREATE TABLE IF NOT EXISTS `lh_msg` (\n\t\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t `msg` text NOT NULL,\n\t\t\t\t `time` int(11) NOT NULL,\n\t\t\t\t `chat_id` int(11) NOT NULL DEFAULT '0',\n\t\t\t\t `user_id` int(11) NOT NULL DEFAULT '0',\n\t\t\t\t `name_support` varchar(100) NOT NULL,\n\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t KEY `chat_id_id` (`chat_id`, `id`)\n\t\t\t\t) DEFAULT CHARSET=utf8;");
// Forgot password table
$db->query("CREATE TABLE IF NOT EXISTS `lh_forgotpasswordhash` (\n `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n `user_id` INT NOT NULL ,\n `hash` VARCHAR( 40 ) NOT NULL ,\n `created` INT NOT NULL\n ) DEFAULT CHARSET=utf8;");
// User groups table
$db->query("CREATE TABLE IF NOT EXISTS `lh_groupuser` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `group_id` int(11) NOT NULL,\n `user_id` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `group_id` (`group_id`),\n KEY `user_id` (`user_id`),\n KEY `group_id_2` (`group_id`,`user_id`)\n ) DEFAULT CHARSET=utf8;");
// Assign admin user to admin group
$GroupUser = new erLhcoreClassModelGroupUser();
$GroupUser->group_id = $GroupData->id;
$GroupUser->user_id = $UserData->id;
erLhcoreClassUser::getSession()->save($GroupUser);
//Assign default role functions
$db->query("CREATE TABLE IF NOT EXISTS `lh_rolefunction` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `role_id` int(11) NOT NULL,\n `module` varchar(100) NOT NULL,\n `function` varchar(100) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `role_id` (`role_id`)\n ) DEFAULT CHARSET=utf8;");
// Admin role and function
$RoleFunction = new erLhcoreClassModelRoleFunction();
$RoleFunction->role_id = $Role->id;
$RoleFunction->module = '*';
$RoleFunction->function = '*';
erLhcoreClassRole::getSession()->save($RoleFunction);
// Operators rules and functions
$permissionsArray = array(array('module' => 'lhuser', 'function' => 'selfedit'), array('module' => 'lhuser', 'function' => 'changeonlinestatus'), array('module' => 'lhuser', 'function' => 'changeskypenick'), array('module' => 'lhuser', 'function' => 'personalcannedmsg'), array('module' => 'lhuser', 'function' => 'change_visibility_list'), array('module' => 'lhuser', 'function' => 'see_assigned_departments'), array('module' => 'lhchat', 'function' => 'use'), array('module' => 'lhchat', 'function' => 'chattabschrome'), array('module' => 'lhchat', 'function' => 'singlechatwindow'), array('module' => 'lhchat', 'function' => 'allowopenremotechat'), array('module' => 'lhchat', 'function' => 'allowchattabs'), array('module' => 'lhchat', 'function' => 'use_onlineusers'), array('module' => 'lhchat', 'function' => 'take_screenshot'), array('module' => 'lhfront', 'function' => 'use'), array('module' => 'lhsystem', 'function' => 'use'), array('module' => 'lhtranslation', 'function' => 'use'), array('module' => 'lhchat', 'function' => 'allowblockusers'), array('module' => 'lhsystem', 'function' => 'generatejs'), array('module' => 'lhsystem', 'function' => 'changelanguage'), array('module' => 'lhchat', 'function' => 'allowredirect'), array('module' => 'lhchat', 'function' => 'allowtransfer'), array('module' => 'lhchat', 'function' => 'administratecannedmsg'), array('module' => 'lhchat', 'function' => 'sees_all_online_visitors'), array('module' => 'lhpermission', 'function' => 'see_permissions'), array('module' => 'lhquestionary', 'function' => 'manage_questionary'), array('module' => 'lhfaq', 'function' => 'manage_faq'), array('module' => 'lhchatbox', 'function' => 'manage_chatbox'), array('module' => 'lhbrowseoffer', 'function' => 'manage_bo'), array('module' => 'lhxml', 'function' => '*'), array('module' => 'lhcobrowse', 'function' => 'browse'), array('module' => 'lhfile', 'function' => 'use_operator'), array('module' => 'lhfile', 'function' => 'file_delete_chat'), array('module' => 'lhspeech', 'function' => 'changedefaultlanguage'), array('module' => 'lhspeech', 'function' => 'use'), array('module' => 'lhspeech', 'function' => 'change_chat_recognition'));
foreach ($permissionsArray as $paramsPermission) {
$RoleFunctionOperator = new erLhcoreClassModelRoleFunction();
$RoleFunctionOperator->role_id = $RoleOperators->id;
$RoleFunctionOperator->module = $paramsPermission['module'];
$RoleFunctionOperator->function = $paramsPermission['function'];