Sunan Ibn Majah, Volume 5, Book 37, Hadith 4230 (DarusSalam)

It was narrated from Jabir that the Messenger of Allah said: “People will be gathered (on the Day of Resurrection) according to their intentions.”

حَدَّثَنَا زُهَيْرُ بْنُ مُحَمَّدٍ، أَنْبَأَنَا زَكَرِيَّا بْنُ عَدِيٍّ، أَنْبَأَنَا شَرِيكٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي سُفْيَانَ، عَنْ جَابِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏:‏ ‏ "‏ يُحْشَرُ النَّاسُ عَلَى نِيَّاتِهِمْ ‏" ‏ ‏.‏

sunnah.com