I am writing a custom user profile edit page. Currently this is done as a plugin accessed by a short code.
I want to update the password. However when this is done the user is logged out. I tried reseting the cookie for login using wp_set_auth_cookie to reset it but this gives an html error as it is trying to output before the header is output.
Note being logged out although not ideal would be OK, however the 'login with Ajax' plugin I am using does not update so it is only apparent you have been logged out when you go to a new page.
Any suggestion of how to make this work?. e.g can I include the code to reset the cookie in the text stream returned by the plugin function so it is output after the header?