本文整理汇总了PHP中JSFactory::setLoadUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP JSFactory::setLoadUserId方法的具体用法?PHP JSFactory::setLoadUserId怎么用?PHP JSFactory::setLoadUserId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSFactory
的用法示例。
在下文中一共展示了JSFactory::setLoadUserId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* @package Jshopping
* @copyright Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
if (!JFactory::getUser()->authorise('core.manage', 'com_jshopping')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
JTable::addIncludePath(JPATH_COMPONENT_SITE . '/tables');
require_once JPATH_COMPONENT_SITE . "/lib/factory.php";
require_once JPATH_COMPONENT_ADMINISTRATOR . '/functions.php';
$ajax = JRequest::getInt('ajax');
$admin_load_user_id = JRequest::getInt('admin_load_user_id');
$adminlang = JFactory::getLanguage();
if ($admin_load_user_id) {
JSFactory::setLoadUserId($admin_load_user_id);
}
if (!JRequest::getVar("js_nolang")) {
JSFactory::loadAdminLanguageFile();
}
$db = JFactory::getDBO();
$jshopConfig = JSFactory::getConfig();
$jshopConfig->setLang($jshopConfig->getFrontLang());
if ($jshopConfig->adminLanguage != $adminlang->getTag()) {
$config = new jshopConfig($db);
$config->id = $jshopConfig->load_id;
$config->adminLanguage = $adminlang->getTag();
if (!$config->store()) {
JError::raiseWarning("", _JSHOP_ERROR_SAVE_DATABASE);
return 0;
}