Optimize rank setter in user.js