Oh ok. Now I getcha.
Well, you don't need to look at someone else's code for that. It's just a simple database query.
Eg:
Table structure:
Table Users{
iID
sName
sPassword
dtLastLogin
}
Query:
SELECT sName FROM Users ORDER BY dtLastLogin LIMIT 0, 10
That will get the last 10 users who have logged in whether they have logged in or not assuming you have a similar database structure.
Then just do with that data what you like.
hope that helps
-Adam 🙂