Sayyiduna Abdullah bin Sarjis (may Allah be pleased with him) states: The Prophet (peace and blessings be upon him) saw a man sitting in the mosque while the people were praying. When he had completed the prayer, he said: "When one of you has prayed in his house and then comes to the mosque while the people are praying, he should pray with them; it will be voluntary (nafl) for him."
Imam al-Tabarani recorded this narration in al-Mu'jam al-Kabir; its chain contains a narrator, Ibrahim bin Zakariyya. If he is al-Ijli al-Wasiti, then he is da'if (weak), and if he is someone else, then I do not know him.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2176