本文整理汇总了PHP中JEVHelper::getGid方法的典型用法代码示例。如果您正苦于以下问题:PHP JEVHelper::getGid方法的具体用法?PHP JEVHelper::getGid怎么用?PHP JEVHelper::getGid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JEVHelper
的用法示例。
在下文中一共展示了JEVHelper::getGid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isEventDeletor
function isEventDeletor($strict = false)
{
static $isEventDeletor;
if (!isset($isEventDeletor)) {
$isEventDeletor = array();
}
$type = $strict ? "strict" : "notstrict";
if (!isset($isEventDeletor[$type])) {
$isEventDeletor[$type] = false;
$user =& JEVHelper::getAuthorisedUser();
if (is_null($user)) {
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
$authorisedonly = $params->get("authorisedonly", 0);
if (!$authorisedonly) {
if (JVersion::isCompatible("1.6.0")) {
$juser = JFactory::getUser();
$isEventDeletor[$type] = $juser->authorise('core.deleteall', 'com_jevents');
} else {
$publishlevel = $params->get("jevpublish_level", 20);
$juser = JFactory::getUser();
if (JEVHelper::getGid($user) >= $publishlevel) {
$isEventDeletor[$type] = true;
}
}
}
} else {
if ($user->candeleteall) {
$isEventDeletor[$type] = true;
} else {
if (!$strict && $user->candeleteown) {
$isEventDeletor[$type] = true;
}
}
}
}
return $isEventDeletor[$type];
}