Listing 9.10: updated user controller to handle successful updates