本文整理汇总了PHP中JFactory::getUSER方法的典型用法代码示例。如果您正苦于以下问题:PHP JFactory::getUSER方法的具体用法?PHP JFactory::getUSER怎么用?PHP JFactory::getUSER使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFactory
的用法示例。
在下文中一共展示了JFactory::getUSER方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: site
function site()
{
$db = JFactory::getDBO();
$user = JFactory::getUSER();
//geting usertype from user
$arrMultiGroups[] = $user->usertype;
//get multigrop names if user have it
$sqlGetMultigroups = "SELECT grp.name FROM #__core_acl_aro_groups as grp, #__noixacl_multigroups multigrp WHERE grp.id = multigrp.id_group AND multigrp.id_user = {$user->id}";
$db->setQuery($sqlGetMultigroups);
$multiGroups = $db->loadObjectList();
if (!empty($multiGroups)) {
foreach ($multiGroups as $mgrp) {
$arrMultiGroups[] = $mgrp->name;
}
}
$queryModules = "SELECT axo_section, axo_value FROM #__noixacl_rules WHERE aco_section = 'com_modules' AND aco_value = 'block' AND aro_value IN ('" . implode("','", $arrMultiGroups) . "')";
$db->setQuery($queryModules);
$hideModules = $db->loadObjectList();
if (!empty($hideModules)) {
jimport('joomla.application.module.helper');
foreach ($hideModules as $module) {
$moduleInstance =& JModuleHelper::getModule(str_replace('mod_', '', $module->axo_section), $module->axo_value);
$moduleInstance->position = NULL;
}
}
}