Ray Stedman comments on Nehemiah 7:
Here Nehemiah seeks to perpetuate the achievements that he has brought about, by appointing wise successors and establishing sound policies.
After the wall had been rebuilt and I had set the doors in place, the gatekeepers and the singers and the Levites were appointed. I put in charge of Jerusalem my brother Hanani, along with Hananiah the commander of the citadel, because he was a man of integrity and feared God more than most men do. I said to them, “The gates of Jerusalem are not to be opened until the sun is hot. While the gatekeepers are still on duty, have them shut the doors and bar them. Also appoint residents of Jerusalem as guards, some at their posts and some near their own houses.” {Neh 7:1-3 NIV}
Though the wall was now finished, Nehemiah did not cease taking precautions. He realized that they were still subject to attack, and rather than open the gates at dawn, as most cities did, he directs, “Do not open them until the sun is hot.” This would preclude any possibility of a surprise attack while the people were still sleeping. He appoints residents to stand guard at the vulnerable points of the city wall.
This is teaching us that we must never let down our guard. How many men of prominence in the Christian life have we seen fall in their later years because they let down their guard and ceased to do battle with the enemy!
The rest of the chapter is given over to preserving the purity of the doctrine that God has taught, and the commitment of the Jews to the cause. It was necessary to ensure that only true Israelites lived within Jerusalem.