  def self.get_account_roots_for(user)

    return nil if user.nil?

    if user.kind_of?(User)
      user_id = user.id
    else
      user_id = user.to_s
    end

    SqlHelper.validate_token([user_id])

    con = []
    con << "(user_id=#{user_id})"
    con << "(xtype='#{MailFolder::XTYPE_ACCOUNT_ROOT}')"

    order_by = 'xorder ASC, id ASC'

    return MailFolder.where(con.join(' and ')).order(order_by).to_a
  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.