  def ajax_exclude_users
    Log.add_info(request, params.inspect)

    return unless request.post?

    group_id = params[:id]
    SqlHelper.validate_token([group_id])

    unless params[:check_user].blank?
      count = 0
      params[:check_user].each do |user_id, value|
        if value == '1'

          begin
            user = User.find(user_id)
            user.exclude_from(group_id)
            user.save!
          rescue => evar
            user = nil
            Log.add_error(request, evar)
          end

          count += 1
        end
      end
      flash[:notice] = t('msg.update_success')
    end

    get_users
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.