本文整理汇总了PHP中XoopsUser::isAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser::isAdmin方法的具体用法?PHP XoopsUser::isAdmin怎么用?PHP XoopsUser::isAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsUser
的用法示例。
在下文中一共展示了XoopsUser::isAdmin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eventCoreIncludeCommonLanguage
/**
* To prevent errors when upload images with closed site
*/
public function eventCoreIncludeCommonLanguage()
{
global $xoopsConfig;
if ($xoopsConfig['cpanel'] != 'redmexico') {
$db = XoopsDatabaseFactory::getDatabaseConnection();
$db->queryF("UPDATE " . $db->prefix("config") . " SET conf_value='redmexico' WHERE conf_modid=0 AND conf_catid=1 AND conf_name='cpanel'");
}
/**
* Check before to a rmcommon native module be installed
*/
$fct = RMHttpRequest::get('fct', 'string', '');
$op = RMHttpRequest::get('op', 'string', '');
if ('modulesadmin' == $fct && 'install' == $op) {
$dirname = RMHttpRequest::get('module', 'string', '');
if ('' != $dirname) {
$module = new XoopsModule();
$module->loadInfoAsVar($dirname);
if ($module->getInfo('rmnative')) {
RMUris::redirect_with_message(__('Please install %s using the modules manager from Common Utilities to prevent errors during install.', 'rmcommon'), RMCURL . '/modules.php?action=install&dir=' . $dirname, RMMSG_WARN);
}
}
}
if (RMUris::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
$security = rmc_server_var($_POST, 'rmsecurity', 0);
$data = TextCleaner::getInstance()->decrypt($security, true);
$data = explode("|", $data);
// [0] = referer, [1] = session_id(), [2] = user, [3] = token
$xoopsUser = new XoopsUser($data[0]);
if ($xoopsUser->isAdmin()) {
$xoopsConfig['closesite'] = 0;
}
}
RMEvents::get()->run_event('rmcommon.include.common.language');
}
示例2: eventCoreIncludeCommonLanguage
/**
* To prevent errors when upload images with closed site
*/
public function eventCoreIncludeCommonLanguage()
{
global $xoopsConfig;
if (RMFunctions::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
$security = rmc_server_var($_POST, 'rmsecurity', 0);
$data = TextCleaner::getInstance()->decrypt($security, true);
$data = explode("|", $data);
// [0] = referer, [1] = session_id(), [2] = user, [3] = token
$xoopsUser = new XoopsUser($data[0]);
if ($xoopsUser->isAdmin()) {
$xoopsConfig['closesite'] = 0;
}
}
}