• Resolved wow1

    (@wow1)


    I’m trying UM. The goal:
    Role “A” suppose only view Roles “A” in A Dir and “B” in B Dir, but not permitted to edit them.
    However, if ‘Can edit other member accounts?’ unchecked, “A” don’t see any member directories and I’m getting:
    ‘We are sorry. We cannot find any users who match your search criteria.’

    Yes, Can view other member profiles? and Can view these user roles only – activated.

    As soon as I activate ‘Can edit other member accounts?’ – Role “A” able to see everything. But, also can edit everything – and, please, I do not need that at all. )
    I figured, work around is to do permissions in the Form with every field. But Really?! No..
    Then what the propose of Can edit other member accounts?

    Obviously I miss something.
    TY!

    • This topic was modified 1 year, 2 months ago by wow1.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    The “Can edit other member accounts?” permission is not needed to view other member profiles. You may see the “We are sorry. We cannot find any users who match your search criteria.” message in the member directory if all profiles are not approved or if profiles are private.

    The “Can edit other member accounts?” role setting is used to allow administrators to edit other members’ profiles. We don’t recommend granting this permission to someone except the Administrator. This is a high-priority permission that can bypass some restrictions. It allows administrators to see unapproved and private profiles in the member directory.

    Please verify that all profiles you want to display in the member directory are approved and are not private.

    Thread Starter wow1

    (@wow1)

    Thank you yuriinalivaiko.
    All members approved. Let me see if their private is off.
    I do understand your point that “can edit other accounts” is very high type of permission intended primary for admin use. And that’s why I do not want to give this permission to my A member.

    • This reply was modified 1 year, 2 months ago by wow1.
    Thread Starter wow1

    (@wow1)

    At the moment all members have Profile Privacy set to Everyone
    Who can send me private messages? – Everyone too.

    Thread Starter wow1

    (@wow1)

    So… No help here possible.

    @wow1

    You can try this code snippet with the shortcode used as in this example:

    
    [member_directory_by_role user_role="um_role_a" directory_id="2847" ]
    [member_directory_by_role user_role="um_role_b" directory_id="3870" ]
    

    Add the shortcodes one for each role assignment to your member directory page.
    Role um_role_a will see the directory with id = 2847 ie your directory A.
    Role um_role_b will see the directory with id = 3870 ie your directory B.
    Change the directory ids required for your site.

    add_shortcode( 'member_directory_by_role', 'member_directory_by_role_shortcode' );
    
    function member_directory_by_role_shortcode( $atts ) {
    
        if ( ! class_exists( "UM" ) ) return;
    
        foreach( $atts as $key => $att ) {
            $atts[$key] = sanitize_text_field( $att );
        }
    
        $atts = extract( shortcode_atts( array(
                            'user_role'    => '',
                            'directory_id' => '',
                        ), $atts ) );
                    
        um_fetch_user( get_current_user_id() );
    
        if ( UM()->user()->get_role() == $user_role ) {
    
            $shortcode = '[ultimatemember form_id="' . $directory_id . '" /]';
            if ( version_compare( get_bloginfo('version'), '5.4', '<' ) ) {
                echo do_shortcode( $shortcode );
            } else {
                echo apply_shortcodes( $shortcode );
            }
        }
    
        return;
    }

    You can add the code snippet to either your active theme’s functions.php file
    or use the “Code Snippets” plugin.

    https://wordpress.org/plugins/code-snippets/

    • This reply was modified 1 year, 2 months ago by missveronica.
    Thread Starter wow1

    (@wow1)

    Dear Veronica, thank you so much for your snippet, but I believe it has nothing to do with my problem. I do have directory for A and B members. And it works fine. The role settings “Can edit other member accounts?” – doesn’t work the way I expected. I believe it suppose to block EDIT of other accounts only, but it’s totally blocks the VIEW of Directories and Accounts. And privacy/account conformation check suggested by developer didn’t fix the issue. Unless I couldn’t explain it right.

    • This reply was modified 1 year, 2 months ago by wow1.
    • This reply was modified 1 year, 2 months ago by wow1.
    Thread Starter wow1

    (@wow1)

    OK. I was partly wrong and I except that.  If ‘Can edit other member accounts?’ and  ‘Can delete other member accounts?’ unchecked it doesn’t block my users A and B. (if i type it in address bar I can see profile and review, all good). However I can’t even get to them, bc this settings block access to A and B directories.(that’s my users lists). That’s my problem.

    • This reply was modified 1 year, 2 months ago by wow1.
    Thread Starter wow1

    (@wow1)

    This is crazy.

    Ultimate Member – SettingsMisc
    Enable custom table for usermeta  – UNCHECK!

    This is what was poisoning my life for almost 2 month…..

    And developers never heard of this problem? – well…


    Thank you Veronica!
    Thank you Ammar Tello

    https://wordpress.org/support/topic/members-directory-not-working/page/3/

    • This reply was modified 1 year, 2 months ago by wow1.
    • This reply was modified 1 year, 2 months ago by wow1.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can edit other member accounts?’ is closed to new replies.