Code cleanup for user.php