Using a Drupal 6 tutorial for Drupal 7
Drupal 7 doesn't include the core profile module since users are entities which you can attach fields to. If you have added additional fields to the user you can get them with just user_load().

FYI: it is not advisable to the $user when calling user_load() since $user is a global variable which can cause problems.

It doesn't look like that tutorial would ever fully work since get_user_comment_count() is never defined and the get_user_rank() parameter call's for a comment count but uses the $user object in the user_forum_load() function.

To get the comment count of a user you could just lookup the number of comments from the comment table for a given user and the tutorial's user_comment_rank() should still work.