CreateUserDTO
extends AbstractBaseDto
in package
implements
DTOInterface
Table of Contents
Interfaces
Properties
- $authenticationProviderId : string|null
- The authentication provider this login is associated with.
- $communicationAddress : string
- The communication channel address, e.g. the user’s email address.
- $communicationType : string
- The communication channel type, e.g. ‘email’ or ‘sms’.
- $confirmationUrl : bool|null
- Only valid for account admins. If true, returns the new user account confirmation URL in the response.
- $destination : string|null
- If you’re setting the password for the newly created user, you can provide this param with a valid URL pointing into this Canvas installation, and the response will include a destination field that’s a URL that you can redirect a browser to and have the newly created user automatically logged in. The URL is only valid for a short time, and must match the domain this request is directed to, and be for a well-formed path that Canvas can recognize.
- $enableSisReactivation : bool
- When true, will first try to re-activate a deleted user with matching sis_user_id if possible.
- $forceSelfRegistration : bool
- Send user a self-registration style email if true.
- $forceValidations : bool|null
- If true, validations are performed on the newly created user (and their associated pseudonym) even if the request is made by a privileged user like an admin. When set to false, or not included in the request parameters,any newly created users are subject to validations unless the request is made by a user with a ‘manage_user_logins’ right. In which case, certain validations such as ‘require_acceptance_of_terms’ and ‘require_presence_of_name’ are not enforced. Use this parameter to return helpful json errors while building users with an admin request.
- $initialEnrollmentType : string|null
- ‘observer` if doing a self-registration with a pairing code.
- $integrationId : string|null
- Integration ID for the login. To set this parameter, the caller must be able to manage SIS permissions.
- $locale : string|null
- The user’s preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.
- $name : string
- The full name of the user. This name will be used by teacher for grading.
- $pairingCode : string|null
- If provided and valid, will link the new user as an observer to the student’s whose pairing code is given.
- $password : string|null
- User’s password. Cannot be set during self-registration.
- $sendConfirmation : bool
- Send user notification of account creation if true. Automatically set to true during self-registration.
- $shortName : string|null
- User’s name as it will be displayed in discussions, messages, and comments.
- $sisUserId : string|null
- SIS ID for the user’s account. To set this parameter, the caller must be able to manage SIS permissions.
- $skipConfirmation : bool
- Only valid for site admins and account admins making requests; If true, the channel is automatically validated and no confirmation email or SMS is sent.
- $skipRegistration : bool
- Automatically mark the user as registered.
- $sortableName : string|null
- User’s name as used to sort alphabetically in lists.
- $termsOfUse : bool
- Whether the user accepts the terms of use. Required if this is a self-registration and this canvas instance requires users to accept the terms (on by default).
- $timeZone : string|null
- The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.
- $uniqueId : string
- User’s login ID. If this is a self-registration, it must be a valid email address.
- $apiPropertyName : string
- The name of the property in the API
Methods
- __construct() : mixed
- BaseDto constructor.
- getAuthenticationProviderId() : string|null
- getCommunicationAddress() : string
- getCommunicationType() : string
- getConfirmationUrl() : bool|null
- getDestination() : string|null
- getForceValidations() : bool|null
- getInitialEnrollmentType() : string|null
- getIntegrationId() : string|null
- getLocale() : string|null
- getName() : string
- getPairingCode() : string|null
- getPassword() : string|null
- getShortName() : string|null
- getSisUserId() : string|null
- getSortableName() : string|null
- getTimeZone() : string|null
- getUniqueId() : string
- isEnableSisReactivation() : bool
- isForceSelfRegistration() : bool
- isSendConfirmation() : bool
- isSkipConfirmation() : bool
- isSkipRegistration() : bool
- isTermsOfUse() : bool
- setAuthenticationProviderId() : void
- setCommunicationAddress() : void
- setCommunicationType() : void
- setConfirmationUrl() : void
- setDestination() : void
- setEnableSisReactivation() : void
- setForceSelfRegistration() : void
- setForceValidations() : void
- setInitialEnrollmentType() : void
- setIntegrationId() : void
- setLocale() : void
- setName() : void
- setPairingCode() : void
- setPassword() : void
- setSendConfirmation() : void
- setShortName() : void
- setSisUserId() : void
- setSkipConfirmation() : void
- setSkipRegistration() : void
- setSortableName() : void
- setTermsOfUse() : void
- setTimeZone() : void
- setUniqueId() : void
- toApiArray() : array<string|int, mixed>
- Convert the DTO to an array for API requests
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
Properties
$authenticationProviderId
The authentication provider this login is associated with.
public
string|null
$authenticationProviderId
Logins associated with a specific provider can only be used with that provider. Legacy providers (LDAP, CAS, SAML) will search for logins associated with them, or unassociated logins. New providers will only search for logins explicitly associated with them. This can be the integer ID of the provider, or the type of the provider (in which case, it will find the first matching provider).
$communicationAddress
The communication channel address, e.g. the user’s email address.
public
string
$communicationAddress
$communicationType
The communication channel type, e.g. ‘email’ or ‘sms’.
public
string
$communicationType
$confirmationUrl
Only valid for account admins. If true, returns the new user account confirmation URL in the response.
public
bool|null
$confirmationUrl
$destination
If you’re setting the password for the newly created user, you can provide this param with a valid URL pointing into this Canvas installation, and the response will include a destination field that’s a URL that you can redirect a browser to and have the newly created user automatically logged in. The URL is only valid for a short time, and must match the domain this request is directed to, and be for a well-formed path that Canvas can recognize.
public
string|null
$destination
$enableSisReactivation
When true, will first try to re-activate a deleted user with matching sis_user_id if possible.
public
bool
$enableSisReactivation
This is commonly done with user and communication_channel so that the default communication_channel is also restored.
$forceSelfRegistration
Send user a self-registration style email if true.
public
bool
$forceSelfRegistration
Setting it means the users will get a notification asking them to “complete the registration process” by clicking it, setting a password, and letting them in. Will only be executed on if the user does not need admin approval. Defaults to false unless explicitly provided.
$forceValidations
If true, validations are performed on the newly created user (and their associated pseudonym) even if the request is made by a privileged user like an admin. When set to false, or not included in the request parameters,any newly created users are subject to validations unless the request is made by a user with a ‘manage_user_logins’ right. In which case, certain validations such as ‘require_acceptance_of_terms’ and ‘require_presence_of_name’ are not enforced. Use this parameter to return helpful json errors while building users with an admin request.
public
bool|null
$forceValidations
$initialEnrollmentType
‘observer` if doing a self-registration with a pairing code.
public
string|null
$initialEnrollmentType
This allows setting the password during user creation.
$integrationId
Integration ID for the login. To set this parameter, the caller must be able to manage SIS permissions.
public
string|null
$integrationId
The Integration ID is a secondary identifier useful for more complex SIS integrations.
$locale
The user’s preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.
public
string|null
$locale
$name
The full name of the user. This name will be used by teacher for grading.
public
string
$name
Required if this is a self-registration.
$pairingCode
If provided and valid, will link the new user as an observer to the student’s whose pairing code is given.
public
string|null
$pairingCode
$password
User’s password. Cannot be set during self-registration.
public
string|null
$password
$sendConfirmation
Send user notification of account creation if true. Automatically set to true during self-registration.
public
bool
$sendConfirmation
$shortName
User’s name as it will be displayed in discussions, messages, and comments.
public
string|null
$shortName
$sisUserId
SIS ID for the user’s account. To set this parameter, the caller must be able to manage SIS permissions.
public
string|null
$sisUserId
$skipConfirmation
Only valid for site admins and account admins making requests; If true, the channel is automatically validated and no confirmation email or SMS is sent.
public
bool
$skipConfirmation
Otherwise, the user must respond to a confirmation message to confirm the channel. If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. Otherwise, the user will not receive any messages about their account creation.
$skipRegistration
Automatically mark the user as registered.
public
bool
$skipRegistration
If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. Otherwise, the user will not receive any messages about their account creation. The users communication channel confirmation can be skipped by setting "communication_channel[skip_confirmation]" to true as well.
$sortableName
User’s name as used to sort alphabetically in lists.
public
string|null
$sortableName
$termsOfUse
Whether the user accepts the terms of use. Required if this is a self-registration and this canvas instance requires users to accept the terms (on by default).
public
bool
$termsOfUse
If this is true, it will mark the user as having accepted the terms of use.
$timeZone
The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.
public
string|null
$timeZone
$uniqueId
User’s login ID. If this is a self-registration, it must be a valid email address.
public
string
$uniqueId
$apiPropertyName
The name of the property in the API
protected
string
$apiPropertyName
= ''
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
getAuthenticationProviderId()
public
getAuthenticationProviderId() : string|null
Return values
string|nullgetCommunicationAddress()
public
getCommunicationAddress() : string
Return values
stringgetCommunicationType()
public
getCommunicationType() : string
Return values
stringgetConfirmationUrl()
public
getConfirmationUrl() : bool|null
Return values
bool|nullgetDestination()
public
getDestination() : string|null
Return values
string|nullgetForceValidations()
public
getForceValidations() : bool|null
Return values
bool|nullgetInitialEnrollmentType()
public
getInitialEnrollmentType() : string|null
Return values
string|nullgetIntegrationId()
public
getIntegrationId() : string|null
Return values
string|nullgetLocale()
public
getLocale() : string|null
Return values
string|nullgetName()
public
getName() : string
Return values
stringgetPairingCode()
public
getPairingCode() : string|null
Return values
string|nullgetPassword()
public
getPassword() : string|null
Return values
string|nullgetShortName()
public
getShortName() : string|null
Return values
string|nullgetSisUserId()
public
getSisUserId() : string|null
Return values
string|nullgetSortableName()
public
getSortableName() : string|null
Return values
string|nullgetTimeZone()
public
getTimeZone() : string|null
Return values
string|nullgetUniqueId()
public
getUniqueId() : string
Return values
stringisEnableSisReactivation()
public
isEnableSisReactivation() : bool
Return values
boolisForceSelfRegistration()
public
isForceSelfRegistration() : bool
Return values
boolisSendConfirmation()
public
isSendConfirmation() : bool
Return values
boolisSkipConfirmation()
public
isSkipConfirmation() : bool
Return values
boolisSkipRegistration()
public
isSkipRegistration() : bool
Return values
boolisTermsOfUse()
public
isTermsOfUse() : bool
Return values
boolsetAuthenticationProviderId()
public
setAuthenticationProviderId(string|null $authenticationProviderId) : void
Parameters
- $authenticationProviderId : string|null
setCommunicationAddress()
public
setCommunicationAddress(string $communicationAddress) : void
Parameters
- $communicationAddress : string
setCommunicationType()
public
setCommunicationType(string $communicationType) : void
Parameters
- $communicationType : string
setConfirmationUrl()
public
setConfirmationUrl(bool|null $confirmationUrl) : void
Parameters
- $confirmationUrl : bool|null
setDestination()
public
setDestination(string|null $destination) : void
Parameters
- $destination : string|null
setEnableSisReactivation()
public
setEnableSisReactivation(bool $enableSisReactivation) : void
Parameters
- $enableSisReactivation : bool
setForceSelfRegistration()
public
setForceSelfRegistration(bool $forceSelfRegistration) : void
Parameters
- $forceSelfRegistration : bool
setForceValidations()
public
setForceValidations(bool|null $forceValidations) : void
Parameters
- $forceValidations : bool|null
setInitialEnrollmentType()
public
setInitialEnrollmentType(string|null $initialEnrollmentType) : void
Parameters
- $initialEnrollmentType : string|null
setIntegrationId()
public
setIntegrationId(string|null $integrationId) : void
Parameters
- $integrationId : string|null
setLocale()
public
setLocale(string|null $locale) : void
Parameters
- $locale : string|null
setName()
public
setName(string $name) : void
Parameters
- $name : string
setPairingCode()
public
setPairingCode(string|null $pairingCode) : void
Parameters
- $pairingCode : string|null
setPassword()
public
setPassword(string|null $password) : void
Parameters
- $password : string|null
setSendConfirmation()
public
setSendConfirmation(bool $sendConfirmation) : void
Parameters
- $sendConfirmation : bool
setShortName()
public
setShortName(string|null $shortName) : void
Parameters
- $shortName : string|null
setSisUserId()
public
setSisUserId(string|null $sisUserId) : void
Parameters
- $sisUserId : string|null
setSkipConfirmation()
public
setSkipConfirmation(bool $skipConfirmation) : void
Parameters
- $skipConfirmation : bool
setSkipRegistration()
public
setSkipRegistration(bool $skipRegistration) : void
Parameters
- $skipRegistration : bool
setSortableName()
public
setSortableName(string|null $sortableName) : void
Parameters
- $sortableName : string|null
setTermsOfUse()
public
setTermsOfUse(bool $termsOfUse) : void
Parameters
- $termsOfUse : bool
setTimeZone()
public
setTimeZone(string|null $timeZone) : void
Parameters
- $timeZone : string|null
setUniqueId()
public
setUniqueId(string $uniqueId) : void
Parameters
- $uniqueId : string
toApiArray()
Convert the DTO to an array for API requests
public
toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
Convert the DTO to an array
public
toArray() : array<string|int, mixed>