Sunan Ibn Majah, Book 37, Hadith 131 (Ibn Majah 4234)

It was narrated from Jabir that the Messenger of Allah (ﷺ) said:

“People will be gathered (on the Day of Resurrection) according to their intentions.”