ModelUsers module

User

A model in the Users module, with 43 members for templates, 37 API properties and 48 members for admin templates.

View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 34

Take no arguments.

# getGroups()
?Collection
Get the groups this user('s person) belongs to
# isFrontendUser()
bool
Check whether the user is a frontend user
# isBackendUser()
bool
Check whether the user is a backend user
# isAdmin()
bool
Check whether the user is an admin. Doesn't check if he is an admin for the current site. Also returns true if the user is a developer or a superadmin.
# isSuperAdmin()
bool
Check whether the user is a superadmin. Also returns true if the user is a developer.
# isDeveloper()
bool
Check whether the user is a developer.
# getFullName()
?string
Get the full name for the user. Fetches the full name from the person.
# isActive()
bool
Is user active?
# getStatusLabels()
array
Gets all available statuses with their labels
# getStatusDisplay()
string
Gets status display label
# getUserOauthClientGroupedByApp()
array
Get User's OAuth authorisations by application
# getCurrentActivity()
Collection
Get collection of active access tokens
# getId()
?int
# getType()
?string
# getStatus()
?string
# getUsername()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getPerson()
?Person
# getGlobalUser()
?GlobalUser
# getSettings()
?Collection<Setting>
# getConfirmPassword()
?string
# getApiKeys() Not in API & Jobs
?Collection<ApiKey>
# getLoginTokens()
?Collection<LoginToken>
# getRefreshTokens() Not in API & Jobs
?Collection<RefreshToken>
# getUserAuthenticators()
?Collection<UserAuthenticator>
# getUserOauthClients()
?Collection<UserOauthClient>
# getCustomFieldValues()
?Collection<UserCustomFieldValue>
# getCustomFields()
array
Get the custom fields for this entity
# getExternalId()
?string
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# isLoggedIn() Templates only
bool
Check if the user is logged in

Methods 9

Take arguments. The API serialises only getters that need none.

# getCustomFieldValue(CustomField $customField)
?CustomFieldValue
Get the value for a custom field
# getCustomFieldValueByName(string $customFieldName)
?CustomFieldValue
Get the value for a custom field by the custom field name
# getCustomFieldContent(string $customFieldName)
?Content
Get the content for the custom field identified by the specified name
# getCustomFieldContentOrDefault(string $customFieldName)
?Content
Get the (default) content for the custom field identified by the specified name
# getCustomFieldBoolean(string $customFieldName, ?bool $default)
?bool
Get the (default) content of the custom field as boolean value
# getCustomFieldText(string $customFieldName, ?string $default)
?string
Get the (default) content of the custom field as text
# getCustomFieldImage(string $customFieldName)
?Image
Get the (default) image contained in the custom field
# getCustomFieldFile(string $customFieldName)
?File
Get the (default) file contained in the custom field
# hasCustomField(string $customFieldName)
bool
Check if the entity has a custom field with the specified name

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 37

Read-only values on the record.

# groups
?Collection
Get the groups this user('s person) belongs to
# frontendUser
bool
Check whether the user is a frontend user
# backendUser
bool
Check whether the user is a backend user
# admin
bool
Check whether the user is an admin. Doesn't check if he is an admin for the current site. Also returns true if the user is a developer or a superadmin.
# superAdmin
bool
Check whether the user is a superadmin. Also returns true if the user is a developer.
# developer
bool
Check whether the user is a developer.
# fullName
?string
Get the full name for the user
# active
bool
Is user active?
# statusLabels
array
Gets all available statuses with their labels
# statusDisplay
string
Gets status display label
# userOauthClientGroupedByApp
array
Get User's OAuth authorisations by application
# currentActivity
Collection
Get collection of active access tokens
# deleteUrl Not in Templates
?string
Get the url for deleting the record.
# editUrl Not in Templates
?string
Get the url for editing the record.
# manageUrl Not in Templates
?string
Get the url for managing records.
# id
?int
# type
?string
# status
?string
# username
?string
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.
# person
?Person
# globalUser
?GlobalUser
# settings
?Collection<Setting>
# confirmPassword
?string
# loginTokens
?Collection<LoginToken>
# userAuthenticators
?Collection<UserAuthenticator>
# userOauthClients
?Collection<UserOauthClient>
# customFieldValues
?Collection<UserCustomFieldValue>
# customFieldContent
object
Get a serialized representation of the custom fields associated with the record
# customFields
array
Get the custom fields for this entity
# externalId
?string
# firstName API & Jobs only
?string
Get the first name for the user
# middleName API & Jobs only
?string
Get the middle name for the user
# lastName API & Jobs only
?string
Get the last name for the user
# email API & Jobs only
?string
Get the email address for the user

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 39

Take no arguments.

# getGroups()
?Collection
Get the groups this user('s person) belongs to
# isFrontendUser()
bool
Check whether the user is a frontend user
# isBackendUser()
bool
Check whether the user is a backend user
# isAdmin()
bool
Check whether the user is an admin. Doesn't check if he is an admin for the current site. Also returns true if the user is a developer or a superadmin.
# isSuperAdmin()
bool
Check whether the user is a superadmin. Also returns true if the user is a developer.
# isDeveloper()
bool
Check whether the user is a developer.
# getFullName()
?string
Get the full name for the user. Fetches the full name from the person.
# isActive()
bool
Is user active?
# getStatusLabels()
array
Gets all available statuses with their labels
# getStatusDisplay()
string
Gets status display label
# getUserOauthClientGroupedByApp()
array
Get User's OAuth authorisations by application
# getCurrentActivity()
Collection
Get collection of active access tokens
# getDeleteUrl() Not in Templates
?string
Get the url for deleting the record.
# getEditUrl() Not in Templates
?string
Get the url for editing the record.
# getManageUrl() Not in Templates
?string
Get the url for managing records.
# getId()
?int
# getType()
?string
# getStatus()
?string
# getUsername()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getPerson()
Person
Get the Person for this user
# getGlobalUser()
?GlobalUser
# getSettings()
?Collection<Setting>
# getConfirmPassword()
?string
# getApiKeys() Not in API & Jobs
?Collection<ApiKey>
# getLoginTokens()
?Collection<LoginToken>
# getRefreshTokens() Not in API & Jobs
?Collection<RefreshToken>
# getUserAuthenticators()
?Collection<UserAuthenticator>
# getUserOauthClients()
?Collection<UserOauthClient>
# getCustomFieldValues()
?Collection<UserCustomFieldValue>
# getCustomFields()
array
Get the custom fields for this entity
# getExternalId()
?string
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getDisplayProperty() Admin only
string
Get the display property to use
# getFullNameOrUsername() Admin only
string
Displays the user's full name or username in select fields (like Owner).

Methods 9

Take arguments. The API serialises only getters that need none.

# getCustomFieldValue(CustomField $customField)
?CustomFieldValue
Get the value for a custom field
# getCustomFieldValueByName(string $customFieldName)
?CustomFieldValue
Get the value for a custom field by the custom field name
# getCustomFieldContent(string $customFieldName)
?Content
Get the content for the custom field identified by the specified name
# getCustomFieldContentOrDefault(string $customFieldName)
?Content
Get the (default) content for the custom field identified by the specified name
# getCustomFieldBoolean(string $customFieldName, ?bool $default)
?bool
Get the (default) content of the custom field as boolean value
# getCustomFieldText(string $customFieldName, ?string $default)
?string
Get the (default) content of the custom field as text
# getCustomFieldImage(string $customFieldName)
?Image
Get the (default) image contained in the custom field
# getCustomFieldFile(string $customFieldName)
?File
Get the (default) file contained in the custom field
# hasCustomField(string $customFieldName)
bool
Check if the entity has a custom field with the specified name