getUserByIdentifier function

Future<CubeUser?> getUserByIdentifier(
  1. String identifierName,
  2. dynamic identifierValue, {
  3. Map<String, dynamic>? additionalParameters,
})

Implementation

Future<CubeUser?> getUserByIdentifier(
    String identifierName, dynamic identifierValue,
    {Map<String, dynamic>? additionalParameters}) {
  return GetUsersV2Query.byIdentifier(
    identifierName,
    identifierValue,
    additionalParameters: additionalParameters,
  ).perform().then((pagedResult) =>
      pagedResult.items.isEmpty ? null : pagedResult.items.first);
}