GET users/find-criteriauser:read scope, and if you want to retrieve email address data in the response, the API user will also need Administrator privileges with the Manage users and moderators permission.user - contains the full user record as per the User data typeurls- a list of URLs for more information about this user:api - a link to the API call to retrieve information about this user directly based on the user id (from the core API)public - a link to the public XenForo profile for this useradmin - a link to the admin XenForo profile for this user<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://xenforo21.local/api/users/find-criteria?user_id=2&[email protected]&username=test%20user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_TIMEOUT => 0,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"XF-Api-Key: your-api-key",
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
var_dump($data);
$client = new \GuzzleHttp\Client([
'base_uri' => 'http://xenforo21.local/api/'
]);
$response = $client->request('GET', 'users/find-criteria', [
'query' => [
'user_id' => 2,
'email' => '[email protected]',
'username' => 'test user'
],
'http_errors' => false,
'headers' => [
'XF-Api-Key' => 'your-api-key'
]
]);
$data = \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
var_dump($data);
$response = \Illuminate\Support\Facades\Http::withHeaders([
'XF-Api-Key' => 'your-api-key'
])->get('http://xenforo21.local/api/users/find-criteria', [
'user_id' => 2,
'email' => '[email protected]',
'username' => 'test user'
]);
$data = $response->json();
var_dump($data);
GET users/find-criteriauser:read scope, and if you want to retrieve email address data in the response, the API user will also need Administrator privileges with the Manage users and moderators permission.user - contains the full user record as per the User data typeurls- a list of URLs for more information about this user:api - a link to the API call to retrieve information about this user directly based on the user id (from the core API)public - a link to the public XenForo profile for this useradmin - a link to the admin XenForo profile for this user<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://xenforo21.local/api/users/find-criteria?user_id=2&[email protected]&username=test%20user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_TIMEOUT => 0,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"XF-Api-Key: your-api-key",
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
var_dump($data);
$client = new \GuzzleHttp\Client([
'base_uri' => 'http://xenforo21.local/api/'
]);
$response = $client->request('GET', 'users/find-criteria', [
'query' => [
'user_id' => 2,
'email' => '[email protected]',
'username' => 'test user'
],
'http_errors' => false,
'headers' => [
'XF-Api-Key' => 'your-api-key'
]
]);
$data = \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
var_dump($data);
$response = \Illuminate\Support\Facades\Http::withHeaders([
'XF-Api-Key' => 'your-api-key'
])->get('http://xenforo21.local/api/users/find-criteria', [
'user_id' => 2,
'email' => '[email protected]',
'username' => 'test user'
]);
$data = $response->json();
var_dump($data);
This resource has a discussion thread on the forum where you can ask questions, report issues, and talk with the author and other users.
Inactive member accounts are automatically deleted after 1 month. Some countries cannot register and are not allowed to register on this website, there is a reason for that.
All duplicate accounts will be banned and a warning will be issued to the primary account holder.
To ensure a positive and productive experience for everyone, please take a moment to review the site's guidelines and community rules outlined in the link here. Website Rules of Conduct