Move logic to model and store user id instead of name