Formulize

Forms, workflows, and reporting. 100% free and open source.

Version 7.3 out now!How to installHow to update

Download .zip View on GitHub Join us on Slack Follow on Twitter

findAllEntriesForUsers( (int | array) $user_ids, (array) $scope_uids = array(), (array) $scope_group_ids = array() )

Description

Finds the entry id or ids for the given users in the data handler’s form. Can be limited to only find entries if they were created by a given set of users, or a by a given set of groups.

Parameters

$user_ids - a user id or an array of user ids
$scope_uids - Optional. An array of user ids that should be used to limit the query. Somewhat nonsensical to use this.
$scope_group_ids - Optional. An array of group ids that should be used to limit the query. Has no effect if $scope_uids are specified.

Return Values

Returns an array containing the entries found. If only one entry id is found the array will have one value.

Returns false if the query failed or if the element identifier is invalid, or if the query found no records in the database.

Example

// find the entries created by a user 29 in form 6
$form_id = 6;
$dataHandler = new formulizeDataHandler($form_id);
$entry_ids = $dataHandler->findAllEntriesForUsers(29);