improve get_user_ranks in display_functions.php

Explanation in http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=46051

Not able to login for ticket
Should be RC3.