本文整理匯總了PHP中permissions::getAllRights方法的典型用法代碼示例。如果您正苦於以下問題:PHP permissions::getAllRights方法的具體用法?PHP permissions::getAllRights怎麽用?PHP permissions::getAllRights使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類permissions
的用法示例。
在下文中一共展示了permissions::getAllRights方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __paramInit
$user_id = __paramInit('int', 'uid', 'uid', 0);
permissions::deleteUser($user_id);
header('Location: ?action=user_list');
exit;
break;
case 'user_edit':
$user_id = __paramInit('int', 'uid', 'uid');
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
$user = new users();
$user->GetUserByUID($user_id);
$groups = permissions::getAllGroups();
foreach ($groups as $k => $group) {
$g_rights = permissions::getGroupInfo($group['id']);
$groups[$k]['rights'] = $g_rights['rights'];
}
$rights = permissions::getAllRights();
$user_groups_data = permissions::getUserGroups($user_id);
$user_groups = array();
$user_groups_rights = array();
foreach ($user_groups_data as $user_group) {
array_push($user_groups, $user_group['id']);
$g_rights = permissions::getGroupInfo($user_group['id']);
if ($g_rights['rights']) {
foreach ($g_rights['rights'] as $g_right) {
if (!in_array($g_right, $user_groups_rights)) {
array_push($user_groups_rights, $g_right);
}
}
}
}
$user_rights_data = permissions::getUserExtraRights($user_id);