The verb "to have" can present itself with the meaning of "exist" and, in this case, it will be impersonal, conjugated in the 3rd person singular.
Look:
The) He had many people at the mall.
B) Had different types of candy on birthday.
The verb "to have" as an auxiliary to the verb "be" remains in the 3rd person singular:
The) He hadhappened more than one attempted revolution before this one.
b) Before you order, already he hadhappened thousands of donations.
If in doubt, replace the verb "to have" per "exist", if it fits in the sentence, it is a sign that the first has the same meaning as the second and must, therefore, be in the 3rd person singular:
With the verb to have: There were many people at the mall.
With the verb exist: There were many people in the mall.
Don't forget that the verb "exist" it's not impersonal, so, flexes normally in number and person (singular or plural):
a) In the store existed only one seller.
b) In the store existed thousands of sellers.
By Sabrina Vilarinho
Graduated in Letters
Brazil School Team
See more!
The use of "you" - Do I say greet him or greet him?
Grammar - Brazil School
Source: Brazil School - https://brasilescola.uol.com.br/gramatica/tinha-ou-tinham.htm