User Elements

This service is used to manage one or many User Elements.

find( $identifier )

Returns an User Element

ArgumentAcceptsDescription
$identifierstring, integer, UserA unique User identifier such as username, email or id.
{% set element = craft.organizations.users.find(1) %}
{% set element = craft.organizations.users.find('foo@bar.com') %}

getQuery( $criteria )

Returns a User Query.

ArgumentAcceptsDescription
$criteriaarrayAn array of User Query criteria.
{% set query = craft.organizations.users.getQuery({
    id: 1
}) %}

create( $config = [] )

Returns a new User Element (but does not save).

ArgumentAcceptsDescription
$configarrayAn user configuration
{% set element = craft.organizations.users.create({
    firstName: 'Nate',
    lastName: 'Iler'
}) %}