Search.../

items

Returns an array of members items that match the query.

Description

items contains the current page of results retrieved by the query. If no results match the query, items is an empty array. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by members to navigate the pages of a query result.

Type:

Array<
Member
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Date and time when the member was created.

_id
string

Member ID.

_updatedDate
Date

Date and time when the member was updated.

activityStatus
string

Member activity status.

  • ACTIVE: Member can write forum posts and blog comments.
  • MUTED: Member cannot write forum posts or blog comments.
  • UNKNOWN: Insufficient permissions to get the status.
contact
Contact

Member's contact information. Contact information is stored in the Contact List.

contactId
string

Contact ID.

lastLoginDate
Date

Date and time when the member last logged in to the site.

loginEmail
string

Email used by the member to log in to the site.

loginEmailVerified
boolean

Whether the email used by the member has been verified.

privacyStatus
string

Member privacy status.

  • PUBLIC: Member is visible to everyone.
  • PRIVATE: Member is hidden from site visitors and other site members. Member is returned only to site contributors and apps with the appropriate permissions.
  • UNKNOWN: Insufficient permissions to get the status.
profile
Profile

Profile display info.

status
string

Member site access status.

  • PENDING: Member created and is waiting for approval by site owner.
  • APPROVED: Member can log in to the site.
  • OFFLINE: Member is a guest author for the site blog and cannot log in to the site.
  • BLOCKED: Member is blocked and cannot log in to the site.
  • UNKNOWN: Insufficient permissions to get the status.

Was this helpful?

Get items from a query result

Copy Code
1const returnedItems = results.items;
2
Perform a query and get items from the result

Copy Code
1import { members } from 'wix-members.v2';
2
3export async function myQueryFunction() {
4 const results = await members.queryMembers().find();
5
6 const returnedItems = results.items;
7
8 if (returnedItems.length > 0) {
9 return items;
10 } else {
11 // Handle if no matching items found
12 }
13}
14