that's what is a big question.. how with full pages in his passport he is out of his country. He should get a new passport immediately and for this he should leave Thailand at once.
He should leave Thailand immediately otherwise he will have problem in re entry. I don't know if he was not pointed out for blank pages in his passport when he landed last time. Anyways as advised by many members here ,he should pay for his overstay and leave and apply for tourist visa in his country.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.