Amir (may Allah have mercy on him) narrates that Sayyiduna al-Mughirah bin Shu'bah (may Allah be pleased with him) led us in prayer and stood straight up after two rak'ahs without sitting. The people said 'Subhan Allah' (Glory be to Allah), but he did not sit. Then, when he gave the salam, he performed the two prostrations of forgetfulness, and then said: "I saw the Prophet (peace and blessings be upon him) doing it this way."
Regarding prostrating before the salam, the hadith of Sayyiduna Abdullah bin Buhaynah (may Allah be pleased with him) is more authentic than this. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3849