Skip to Content Skip to Menu

after edit and save profile

9 years 7 months ago #262472 by StefanPohl
after edit and save profile was created by StefanPohl
Hello,

If users in frontend edit and save their profile, they will be automatically redirected View Profile. Is there a way after saving profile Edit to stay?

many Thanks

Please Log in or Create an account to join the conversation.

9 years 1 month ago #271299 by jj.willemsen
Replied by jj.willemsen on topic after edit and save profile
I notice that Stefan's question has not been answered.

My client wants the redirect after saving the profile, in the edit profile screen to not redirect to the profile viewer.

This is exactly the same question as Stefan's.

After hours of research and trial and error testing, I found the following solution:

In the file /components/com_comprofiler/comprofiler.php change the line:

cbRedirectToProfile( $uid, CBTxt::Th( 'USER_DETAILS_SAVE', 'Your settings have been saved.' ) );

to the line:

cbRedirect("index.php?option=com_comprofiler&view=userdetails", CBTxt::Th( 'USER_DETAILS_SAVE', 'Your settings have been saved.' ) );

That makes it redirect back to the Edit Profile screen instead of attempting to redirect to the Profile Viewer screen, after saving the altered profile.

Of course, you always have to take care in case a future CB update overwrites the hack, in which case you will have to re-apply it.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum