Introduction

The MembershipsQueryBuilder functions enable you to run, sort, filter, and control which results a query returns.

Typically, you build a query using the queryMemberships() function, refine the query by chaining MembershipsQueryBuilder functions, and then execute the query by chaining the find() function.

For example, the following code returns the site member's first 5 group memberships with admin roles.

Copy
Did this help?