Refactor user update logic function [this is a lie]