How can I make the core edit profile form redirect to a specified page on submission?
Ok, I've written a small plugin that does what you want without having to make any core hacks.
You can have a look at the source code here:
Or you can download the plugin ready to install from here:
Just a small explanation:
I've utilized the
onUserAfterSave which is triggered when a user is saved in the database, or when the information for the user is updated.
To make sure that this redirect only occurs when the information is updated for an existing user, the code only executes when
$isNew == false.
In the plugin, I've also added a parameter, allowing you to choose the menu item you'd like to redirect to.
Happy redirecting :)
Some time passed, but if people are searching for this, you can do something like this. Before redirection (after saving profile) one can set a state to redirect where you want and no extra code or plugin is needed:
$url = 'index.php?option=com_mycomp&view=something'; $app->setUserState('com_users.edit.profile.redirect', $url);