• Resolved donald91

    (@donald91)


    I use a code get_users() to receive all subscribers, which are “Normal members” on my page.
    But I noted that my user (admin rights, but also has user role “subscriber” (via this plugin) is only listed, when I am logged in. For others, I seem invisible.
    In the frontend it works, this is only case in the backend. Any ideas how to solve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    URE protects users with administrator role from others by default. You can switch this befor call of get_users() and restore back using code below as a starting point:

    // Switch off URE’s protection of users with ‘administrator’ role from each other and other users with ‘edit_users’ capability

    add_filter( ‘ure_supress_administrators_protection’, ‘switch_off_ure_admin_protection’, 10, 1);

    function switch_off_ure_admin_protection( $switch_off ) {

    $switch_off = true;
    
    return $switch_off;

    }

    Thread Starter donald91

    (@donald91)

    perfect, thant worked. thanks!

    could not find the option in the settings, maybe nice to add 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘admin not showing in get_users()’ is closed to new replies.