Redirect user after successful email change
You need to do the processing of the form before headers are sent downstream. Otherwise, if you do it while the body is loading (the way you have it now), then redirecting after a successful email change will result in an error. A lot of people would use the init action for this; but personally, … Read more