Apart from this, the temperature generated from lightning is approximately around 30,000 degrees Celcius which is about five times the temperature on the surface of the sun. If the thunder is heard within 15 seconds, lightning activity is imminent, within five kilometres. It calls for quick protective action. It is not. The tree acts as a resistance.
Lightning traverses a tree with a tendency to deviate from it and follow a path of least resistance.
Consequently, a person standing too close to a tree, is at great risk to be struck by lightning. The storm active period is about 20 minutes-30 minutes after which the lightnings fade off. If he can protect himself during this period, it's well and good. Yes, they must not stay too close to windows with metal frames. Stay away from walls and large metal objects that could serve as electrical conductors.