Do you think you saw me somewhere before
Do you think you have seen me somewhere before
In my grammar books it says that the Present Perfect is never used with adverbs of past time. In such cases the past tense is used. However it also says that the present perfect is used to express past actions whose time isn't given and not definite.
In the first sentence an adverb of past time is mentioned before according to the book's rules the past tense should be used. But I feel like the latter is correct. Please tell which is right with the reason.