normalize user view/edit code