Yes, but it's a bit tricky because the information you want is in four different database tables. Also, I don't think your table structure will work very well unless all users are in exactly the same number of groups or there are a small number of groups and you don't mind having blank cells. Just doing it with li or span tags might be a better option -- it would make for simpler code.
Do you need the user's full name (if so, it's 5 tables) or would the username do? Using the username would make it faster and easier, but you might not want to expose the username to the public for security reasons. Giving hackers a complete list of all usernames on your site creates a great option for a brute-force attack on the site.