knowingly or unknowingly; with or without someone's knowledge
Used when it is unclear whether someone is aware of something, often implying that the action or situation occurs regardless of that awareness. Functions adverbially, modifying a verb or clause.
Whether he knew it or not, he ended up telling everyone my secret.
Knowingly or not, she uttered a taboo word.