Skip to:
Content

BuddyPress.org

Changeset 8322


Ignore:
Timestamp:
04/25/2014 02:00:23 PM (12 years ago)
Author:
djpaul
Message:

xProfile: fix redirect when an admin uploads an avatar to another user's profile.

When cropping a new avatar, a redirect always took you to the logged-in user's profile.
This was fine in most situations, as a user can only update their own profile.
However, site admins are able to edit other users' profiles, so we need to redirect to the displayed user's profile.

Fixes #5580, props milesstewart88

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-screens.php

    r8291 r8322  
    210210            do_action( 'xprofile_avatar_uploaded' );
    211211            bp_core_add_message( __( 'Your new avatar was uploaded successfully.', 'buddypress' ) );
    212             bp_core_redirect( bp_loggedin_user_domain() );
     212            bp_core_redirect( bp_displayed_user_domain() );
    213213        }
    214214    }
Note: See TracChangeset for help on using the changeset viewer.