Reduce number of branches in register_user().