Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member Profile Settings Link 404’ing


  • yusareba
    Participant

    @yusareba

    Users are getting a 404 when trying to go to their settings.

    This is likely due to a modification I made to disallow users to change their account email (removing the link entirely)

    This results in a 404:
    https://website.com/members/{username}/settings/

    This results in the correct destination:
    https://website.com/members/{username}/settings/notifications/

    How can I change the settings tab link to go to the 2nd link?

    This would solve the issue while still disallowing users from changing their account email address.

    Note: this is the code I am using to remove the change email address link:

    /** remove general tab of buddypress to prevent change email (non-admin) */
    function venutius_no_general() {
    
    	if( bp_is_active( 'xprofile' ) ) :
    
    	$access        = bp_core_can_edit_settings();
    	$slug          = bp_get_settings_slug();
    
    	$args = array(
    		'parent_slug'     => $slug,
    		'subnav_slug'	  => 'notifications',
    		'screen_function' => 'bp_settings_screen_notification',
    		'user_has_access' => $access
    		);
     
    	bp_core_new_nav_default( $args );
    
    	bp_core_remove_subnav_item( 'settings', 'general' );
    
    	endif;
    
    }
    add_action( 'bp_actions', 'venutius_no_general' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Member Profile Settings Link 404’ing’ is closed to new replies.
Skip to toolbar