本文整理汇总了PHP中CGroups::canRead方法的典型用法代码示例。如果您正苦于以下问题:PHP CGroups::canRead方法的具体用法?PHP CGroups::canRead怎么用?PHP CGroups::canRead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroups
的用法示例。
在下文中一共展示了CGroups::canRead方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CGroups
CAppUI::redirect("m=system&a=module_missing&mod={$m}");
}
$m = "dP{$m}";
}
// Get current module permissions
// these can be further modified by the included action files
$can = $module->canDo();
$a = CAppUI::checkFileName(CValue::get("a", $index));
$u = CAppUI::checkFileName(CValue::get("u", ""));
$dosql = CAppUI::checkFileName(CValue::post("dosql", ""));
$class = CAppUI::checkFileName(CValue::post("@class", ""));
$tab = $a == "index" ? CValue::getOrSession("tab", $tab) : CValue::get("tab");
// set the group in use, put the user group if not allowed
$g = CValue::getOrSessionAbs("g", CAppUI::$instance->user_group);
$indexGroup = new CGroups();
if ($indexGroup->load($g) && !$indexGroup->canRead()) {
$g = CAppUI::$instance->user_group;
CValue::setSessionAbs("g", $g);
}
$user = CAppUI::$user;
// Check whether the password is strong enough
// If account is not a robot
if ($user->_id && !$user->isRobot() && (!($m == "admin" && $tab == "chpwd") && !($m == "admin" && $dosql == "do_chpwd_aed"))) {
if (CAppUI::$instance->weak_password && (!CAppUI::$instance->user_remote || CAppUI::conf("admin CUser apply_all_users"))) {
CAppUI::redirect("m=admin&tab=chpwd&forceChange=1");
}
// If we want to force user to periodically change password
if (CAppUI::conf("admin CUser force_changing_password") || $user->_ref_user->force_change_password) {
// Need to change
if ($user->_ref_user->force_change_password) {
CAppUI::redirect("m=admin&tab=chpwd&forceChange=1");