Furthered refactor of user.php