-- Both are 'correct', the former formally so. Why do you use "were" with he-- It is the subjunctive form of the verb, which uses 'were' for all persons. The subjunctive is used here for a condition contrary to fact (He is in fact not here).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.