acl_delete() public method

Remove local permission
public acl_delete ( $mode, $ug_id = false, $forum_id = false, $permission_type = false )
コード例 #1
0
         unset($l_ug_list);
     }
     unset($auth_submode);
     unset($auth_setting);
     trigger_error($_CLASS['core_user']->lang['AUTH_UPDATED']);
     break;
 case 'delete':
     $sql = "SELECT auth_option_id\r\n\t\t\tFROM " . FORUMS_ACL_OPTIONS_TABLE . "\r\n\t\t\tWHERE auth_option LIKE '{$sql_option_mode}_%'";
     $result = $_CLASS['core_db']->query($sql);
     if ($row = $_CLASS['core_db']->fetch_row_assoc($result)) {
         $option_id_ary = array();
         do {
             $option_id_ary[] = $row['auth_option_id'];
         } while ($row = $_CLASS['core_db']->fetch_row_assoc($result));
         foreach ($ug_data as $id) {
             $auth_admin->acl_delete($ug_type, $forum_id[$mode], $id, $option_id_ary);
         }
         unset($option_id_ary);
     }
     $_CLASS['core_db']->free_result($result);
     // Do we need to recache the moderator lists? We do if the mode
     // was mod or auth_settings['mod'] is a non-zero size array
     if ($mode == 'mod' || isset($auth_settings['mod']) && sizeof($auth_settings['mod'])) {
         cache_moderators();
     }
     // Logging ... first grab user or groupnames ...
     $sql = $ug_type == 'group' ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE group_id' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE user_id';
     $sql .= ' IN (' . implode(', ', array_map('intval', $ug_data)) . ')';
     $result = $_CLASS['core_db']->query($sql);
     $l_ug_list = '';
     while ($row = $_CLASS['core_db']->fetch_row_assoc($result)) {