Added assignGroupIdsToUser() method to user model. Add and edit work consistently.