Support » Plugin: Ultimate Member - User Profile & Membership Plugin » Bug: “Can make their profile private?” setting not used on account page

  • Resolved Ov3rfly

    (@ov3rfly)


    The setting “Can make their profile private?” in Ultimate Member user role is not used, plugin version 1.3.88

    Users always can make their profile private/nonprivate on account page.

    The check for can_make_private_profile seems to be missing in um_account_page_default_tabs_hook() in file core/um-filters-account.php

    Workaround for theme functions.php which adds the missing check:

    function ov3rfly_um_account_page_default_tabs_hook( $tabs ) {
    	foreach ($tabs as $k => $arr ) {
    		foreach( $arr as $id => $info ) {
    
    			// this check is missing in um-filters-account.php
    			if ( $id == 'privacy' ) {
    				if ( !um_user('can_make_private_profile') && !um_user('can_make_private_profile') ) {
    					unset( $tabs[$k][$id] );
    				}
    			}
    
    		}
    	}
    	return $tabs;
    }
    add_filter('um_account_page_default_tabs_hook', 'ov3rfly_um_account_page_default_tabs_hook' );

    Thanks for the great plugin.

    PS. The privacy functionality itself (visibility of profile, hide from directory) does not seem to work as expected for non-logged-in visitors.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug: “Can make their profile private?” setting not used on account page’ is closed to new replies.