Abilities

Check In

lh-buddypress-check-ins/check-in Idempotent

Checks the current user in to one event. Check-in must be open for that event, exactly as for the check-in form: the event is flagged for check-ins, has an eligible status and is running today (GMT), and no plugin refuses it. Calling it again returns the existing check-in with status already_checked_in rather than adding another. To check other people in, or to record attendance at a past event, use record-check-ins. Any signed-in user who can see the event may call it. Requires read, plus read_post on the event. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
event_idintegerYesID of the event to check in to.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

List Check-ins

lh-buddypress-check-ins/list-check-ins Read-only Idempotent

Lists everyone checked in to an event, earliest first, with their user ID, display name and the time recorded. Each check-in gives its ID, user ID, display name, the time recorded (GMT) and, when it was recorded on their behalf, who recorded it. No email addresses are returned. Requires promote_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
event_idintegerYesID of the event.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Record Check-ins

lh-buddypress-check-ins/record-check-ins Idempotent

Records site members as checked in to an event that has started, on their behalf, and returns a result per user. The event can be today or in the past: for taking attendance at a meeting or backfilling an old one. Check-in does not need to be open for the event, and the lh_bp_check_ins_check_if_can_check_in filter is not applied. Each user must be a member of this site; others are skipped with a reason. Users already checked in are reported as already_checked_in and left alone, so repeating a call is safe. checked_in_gmt sets the time recorded for every new check-in (default now) and may not be in the future. Each new check-in records who recorded it. At most 100 users per call. Requires promote_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
event_idintegerYesID of the event. It must have started.
user_idsarray of integerYesUsers to check in, 1 to 100.
checked_in_gmtstringNoTime to record for every new check-in, GMT, Y-m-d H:i:s. Defaults to now. May not be in the future.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.