Hi there, after a user has edited their profile, they are redirected back to the edit profile page:
https://domain/user/profile/edit/group//
Instead it would be more logic, if they are directed to their profile instead:
Do you have a code snippet for this action?
Regards
CarstenHello Carsten,
Check the following code:
add_action( 'xprofile_updated_profile', function ( $user_id, $posted_field_ids, $errors ) { if ( ! $errors ) { bp_core_add_message( __( 'Changes saved.', 'buddypress' ) ); bp_core_redirect( bp_core_get_user_domain( $user_id ) . bp_get_profile_slug() ); } }, 10, 3 );
But it is not a good user experience.
Regards
RaviHello Ravi, thank you very much for the code, it’s working perfectly. I think this adds something to the UE, as the user do not have to exit edit after update. But that is a matter of opinion.
Thanks again Ravi for bringing up a solution so fast, I really appreciate it.
Regards
Carsten
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] Directed back to profile after edit’ is closed to new replies.
This topic is: resolved