本文整理汇总了PHP中erLhcoreClassUser::oneLoginPerAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassUser::oneLoginPerAccount方法的具体用法?PHP erLhcoreClassUser::oneLoginPerAccount怎么用?PHP erLhcoreClassUser::oneLoginPerAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassUser
的用法示例。
在下文中一共展示了erLhcoreClassUser::oneLoginPerAccount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$dispatcher = erLhcoreClassChatEventDispatcher::getInstance();
// Attatch event listeners
$dispatcher->listen('user.edit.photo_path', array($this, 'userEditPhotoPath'));
$dispatcher->listen('chat.getstatus', array($this, 'getStatus'));
$dispatcher->listen('file.storescreenshot.screenshot_path', array($this, 'screenshotPath'));
$dispatcher->listen('file.uploadfile.file_path', array($this, 'screenshotPath'));
$dispatcher->listen('file.uploadfileadmin.file_path', array($this, 'screenshotPath'));
$dispatcher->listen('file.new.file_path', array($this, 'newFilePath'));
// Themes listeners
$dispatcher->listen('theme.edit.logo_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.need_help_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.offline_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.online_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.copyright_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.operator_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.popup_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.close_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.restore_image_path', array($this, 'themeStoragePath'));
$dispatcher->listen('theme.edit.minimize_image_path', array($this, 'themeStoragePath'));
// Permissions
$dispatcher->listen('feature.can_use_forms', array($this, 'canUseForms'));
$dispatcher->listen('form.index', array($this, 'canUseForms'));
$dispatcher->listen('form.embedcode', array($this, 'canUseForms'));
// Canned messages
$dispatcher->listen('chat.cannedmsg', array($this, 'canUseCannedMessages'));
$dispatcher->listen('chat.newcannedmsg', array($this, 'canUseCannedMessages'));
// FAQ
$dispatcher->listen('faq.list', array($this, 'canUseFAQ'));
$dispatcher->listen('faq.view', array($this, 'canUseFAQ'));
// SugarCRM
$dispatcher->listen('sugarcrm.createorupdatelead', array($this, 'canUseSugarCRM'));
// Browse offers
$dispatcher->listen('browseoffer.index', array($this, 'canUseBO'));
$dispatcher->listen('browseoffer.htmlcode', array($this, 'canUseBO'));
$dispatcher->listen('feature.can_use_browse_offers', array($this, 'canUseBO'));
// Questionary
$dispatcher->listen('questionary.edit', array($this, 'canUseQuestionary'));
$dispatcher->listen('questionary.list', array($this, 'canUseQuestionary'));
$dispatcher->listen('questionary.new', array($this, 'canUseQuestionary'));
// Chatbox
$dispatcher->listen('chatbox.list', array($this, 'canUseChatbox'));
$dispatcher->listen('chatbox.configuration', array($this, 'canUseChatbox'));
// Statistic
$dispatcher->listen('chat.statistic', array($this, 'canUseStatistic'));
// Pro active
$dispatcher->listen('feature.can_use_proactive', array($this, 'canUseProactive'));
// Auto responder
$dispatcher->listen('feature.can_use_autoresponder', array($this, 'canUseAutoresponder'));
$dispatcher->listen('chat.geoadjustment', array($this, 'canUseGeoAdjustment'));
// Block users
$dispatcher->listen('chat.blockedusers', array($this, 'canUseBlock'));
// XMPP send message action
$dispatcher->listen('xml.send_xmp_message', array($this, 'xmppSendMessage'));
// Automated hosting overrides mail sending parameters
$dispatcher->listen('chatmail.setup_smtp', array($this, 'setupSMTP'));
// temporary path
$dispatcher->listen('theme.temppath', array($this, 'tempStoragePath'));
// Disable database variables cache
$dispatcher->listen('tpl.new', array($this, 'changeTemplateSettings'));
// Forms module listener
$dispatcher->listen('form.fill.file_path', array($this, 'formFillPath'));
$dispatcher->listen('xmp.configuration', array($this, 'canUseXMPP'));
// Translation config
$dispatcher->listen('translation.get_config', array($this, 'getTranslationConfig'));
// Check can user create a new operators
$dispatcher->listen('user.new_user', array($this, 'canNewUserCanBeCreated'));
$dispatcher->listen('user.edit_user', array($this, 'canUserBeSaved'));
$dispatcher->listen('chat.sendnotice', array($this, 'canSendNotice'));
$dispatcher->listen('chat.chatcheckoperatormessage', array($this, 'proactiveIsEnabled'));
$instanceCustomer = erLhcoreClassInstance::getInstance();
if (is_object($instanceCustomer)) {
erLhcoreClassModule::$cacheDbVariables = false;
// Disable cache expire for customers, only through command line possible
erConfigClassLhCacheConfig::getInstance()->setExpiredInRuntime(true);
erLhcoreClassModule::$defaultTimeZone = $instanceCustomer->time_zone;
erLhcoreClassModule::$dateFormat = $instanceCustomer->date_format;
erLhcoreClassModule::$dateHourFormat = $instanceCustomer->date_hour_format;
erLhcoreClassModule::$dateDateHourFormat = $instanceCustomer->date_date_hour_format;
// Check one logged user per account
if ($instanceCustomer->one_per_account == 1) {
// Set instance policy regarding how many operators can be looged under same account
erLhcoreClassUser::$oneLoginPerAccount = $instanceCustomer->one_per_account == 1;
}
$cfgSite = erConfigClassLhConfig::getInstance();
$sysConfiguration = erLhcoreClassSystem::instance();
$defaultSiteAccess = $cfgSite->getSetting('site', 'default_site_access');
// Perhaps we need to change default siteaccess
if ($sysConfiguration->SiteAccess != 'site_admin' && $sysConfiguration->SiteAccess == $defaultSiteAccess && !isset($_POST['switchLang']) && $instanceCustomer->siteaccess != '' && $instanceCustomer->siteaccess != $sysConfiguration->SiteAccess) {
$optionsSiteAccessOverride = $cfgSite->getSetting('site_access_options', $instanceCustomer->siteaccess);
$sysConfiguration->Language = $optionsSiteAccessOverride['locale'];
$sysConfiguration->SiteAccess = $instanceCustomer->siteaccess;
$sysConfiguration->ContentLanguage = $optionsSiteAccessOverride['content_language'];
$sysConfiguration->ThemeSite = $optionsSiteAccessOverride['theme'];
if ($defaultSiteAccess != $sysConfiguration->SiteAccess) {
$sysConfiguration->WWWDirLang = '/' . $sysConfiguration->SiteAccess;
}
}
}
//.........这里部分代码省略.........