WordPress.org

Ready to get started?Download WordPress

Ideas

add filter role and bool capabilities for get_users

  1. KwarK
    Member

    something like that

    $args = array(
    'blog_id' => $GLOBALS['blog_id'],
    'role' => ,
    'meta_key' => ,
    'meta_value' => ,
    'meta_compare' => ,
    'include' => array(),
    'exclude' => array(),
    'orderby' => 'login',
    'order' => 'ASC',
    'offset' => ,
    'search' => ,
    'number' => ,
    'count_total' => true,
    'fields' => 'all',
    'who' => ,
    'filter' => 'administrator', 'contributor',...
    //Turn all users in these roles to their bigger capabilities and roles outside the args 'role' and after this traitment, don't displaying in the result.
    'capabilities' => true
    //Get all the values capabilities in an array for the selected args 'role'
     );

    I think is more accessible and flexible for traitment (caps and roles, and delete role) without WP_User objet.

    Posted: 2 years ago #
  2. Tikolan
    Member

    12345

    i also think about flexible Roles and Capabilties with Standard User Features in WordPress

    more than One Userrole per User
    so I can use User Roles like many Usergroups, with features like, Usergroup (Users) can Read spezial Sites, can use spezial Plugins/Funktions, can edit spezial post (an the user must not have Role Author, Editor)

    Posted: 2 years ago #
  3. Anyoption
    Member

    Adding filter role and bool capabilities for get_users is a very good idea. I have to say that I'm surprised that this idea didn't get so many votes. At least 2 Userroles per user would be great.

    Posted: 1 year ago #
  4. Henrik Blovek
    Member

    Yes this seems to work well. I can confirm this has a lot more flexibility when applied correctly.

    Posted: 8 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    4 Votes
  • Status

    This idea is under consideration

No tags yet.