improve get_user_ranks in display_functions.php

Explanation in http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=46051