From ffd05eb429b162b57846aed1769055f499a183eb Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Mon, 18 Apr 2022 20:47:38 +0200
Subject: [PATCH] Extend example to show Lookup by pattern

---
 remoting_client/examples/mail_user_get.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/remoting_client/examples/mail_user_get.php b/remoting_client/examples/mail_user_get.php
index cdec8b7c1e..247d98c15b 100644
--- a/remoting_client/examples/mail_user_get.php
+++ b/remoting_client/examples/mail_user_get.php
@@ -17,9 +17,13 @@ try {
 	//* Set the function parameters.
 	$mailuser_id = 1;
 
-	$app = $client->mail_user_get($session_id, $mailuser_id);
+	// Lookup by primary key, gets back a single record.
+	$mail_user = $client->mail_user_get($session_id, $mailuser_id);
+	print_r($mail_user);
 
-	print_r($app);
+	// Lookup by pattern gives an array of records.
+	$mail_users_array = $client->mail_user_get($session_id, array('email' => '%@example.com'));
+	print_r($mail_user_array);
 
 	if($client->logout($session_id)) {
 		echo 'Logged out.<br />';
-- 
GitLab