Documentation

UpdateUserDTO extends AbstractBaseDto
in package
implements DTOInterface

Table of Contents

Interfaces

DTOInterface

Properties

$avatarState  : string|null
To set the state of user’s avatar. Only valid for account administrator.
$avatarToken  : string|null
A unique representation of the avatar record to assign as the user’s current avatar.
$avatarUrl  : string|null
To set the user’s avatar to point to an external url, do not include a token and instead pass the url here.
$bio  : string|null
Sets a bio on the user profile. (See Get user profile.) Profiles must be enabled on the root account.
$email  : string|null
The default email address of the user.
$event  : string|null
Suspends or unsuspends all logins for this user that the calling user has permission to
$locale  : string|null
The user’s preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.
$name  : string|null
The full name of the user. This name will be used by teacher for grading.
$overrideSisStickiness  : bool|null
Default is true. If false, any fields containing “sticky” changes will not be updated.
$pronouns  : string|null
Sets pronouns on the user profile. Passing an empty string will empty the user’s pronouns Only Available Pronouns set on the root account are allowed Adding and changing pronouns must be enabled on the root account.
$shortName  : string|null
User’s name as it will be displayed in discussions, messages, and comments.
$sortableName  : string|null
User’s name as used to sort alphabetically in lists.
$timeZone  : string|null
The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.
$title  : string|null
Sets a title on the user profile. (See Get user profile.) Profiles must be enabled on the root account.
$apiPropertyName  : string
The name of the property in the API

Methods

__construct()  : mixed
BaseDto constructor.
getAvatarState()  : string|null
getAvatarToken()  : string|null
getAvatarUrl()  : string|null
getBio()  : string|null
getEmail()  : string|null
getEvent()  : string|null
getLocale()  : string|null
getName()  : string|null
getOverrideSisStickiness()  : bool|null
getPronouns()  : string|null
getShortName()  : string|null
getSortableName()  : string|null
getTimeZone()  : string|null
getTitle()  : string|null
setAvatarState()  : void
setAvatarToken()  : void
setAvatarUrl()  : void
setBio()  : void
setEmail()  : void
setEvent()  : void
setLocale()  : void
setName()  : void
setOverrideSisStickiness()  : void
setPronouns()  : void
setShortName()  : void
setSortableName()  : void
setTimeZone()  : void
setTitle()  : 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

$avatarState

To set the state of user’s avatar. Only valid for account administrator.

public string|null $avatarState

Allowed values: none, submitted, approved, locked, reported, re_reported

$avatarToken

A unique representation of the avatar record to assign as the user’s current avatar.

public string|null $avatarToken

This token can be obtained from the user avatars endpoint. This supersedes the user [avatar] [url] argument, and if both are included the url will be ignored. Note: this is an internal representation and is subject to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client.

$avatarUrl

To set the user’s avatar to point to an external url, do not include a token and instead pass the url here.

public string|null $avatarUrl

Warning: For maximum compatibility, please use 128 px square images.

$bio

Sets a bio on the user profile. (See Get user profile.) Profiles must be enabled on the root account.

public string|null $bio

$email

The default email address of the user.

public string|null $email

$event

Suspends or unsuspends all logins for this user that the calling user has permission to

public string|null $event

Allowed values: suspend, unsuspend

$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|null $name

$overrideSisStickiness

Default is true. If false, any fields containing “sticky” changes will not be updated.

public bool|null $overrideSisStickiness

See SIS CSV Format documentation for information on which fields can have SIS stickiness

$pronouns

Sets pronouns on the user profile. Passing an empty string will empty the user’s pronouns Only Available Pronouns set on the root account are allowed Adding and changing pronouns must be enabled on the root account.

public string|null $pronouns

$shortName

User’s name as it will be displayed in discussions, messages, and comments.

public string|null $shortName

$sortableName

User’s name as used to sort alphabetically in lists.

public string|null $sortableName

$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

$title

Sets a title on the user profile. (See Get user profile.) Profiles must be enabled on the root account.

public string|null $title

$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
throws
Exception

getAvatarState()

public getAvatarState() : string|null
Return values
string|null

getAvatarToken()

public getAvatarToken() : string|null
Return values
string|null

getAvatarUrl()

public getAvatarUrl() : string|null
Return values
string|null

getBio()

public getBio() : string|null
Return values
string|null

getEmail()

public getEmail() : string|null
Return values
string|null

getEvent()

public getEvent() : string|null
Return values
string|null

getLocale()

public getLocale() : string|null
Return values
string|null

getName()

public getName() : string|null
Return values
string|null

getOverrideSisStickiness()

public getOverrideSisStickiness() : bool|null
Return values
bool|null

getPronouns()

public getPronouns() : string|null
Return values
string|null

getShortName()

public getShortName() : string|null
Return values
string|null

getSortableName()

public getSortableName() : string|null
Return values
string|null

getTimeZone()

public getTimeZone() : string|null
Return values
string|null

getTitle()

public getTitle() : string|null
Return values
string|null

setAvatarState()

public setAvatarState(string|null $avatarState) : void
Parameters
$avatarState : string|null

setAvatarToken()

public setAvatarToken(string|null $avatarToken) : void
Parameters
$avatarToken : string|null

setAvatarUrl()

public setAvatarUrl(string|null $avatarUrl) : void
Parameters
$avatarUrl : string|null

setBio()

public setBio(string|null $bio) : void
Parameters
$bio : string|null

setEmail()

public setEmail(string|null $email) : void
Parameters
$email : string|null

setEvent()

public setEvent(string|null $event) : void
Parameters
$event : string|null

setLocale()

public setLocale(string|null $locale) : void
Parameters
$locale : string|null

setName()

public setName(string|null $name) : void
Parameters
$name : string|null

setOverrideSisStickiness()

public setOverrideSisStickiness(bool|null $overrideSisStickiness) : void
Parameters
$overrideSisStickiness : bool|null

setPronouns()

public setPronouns(string|null $pronouns) : void
Parameters
$pronouns : string|null

setShortName()

public setShortName(string|null $shortName) : void
Parameters
$shortName : string|null

setSortableName()

public setSortableName(string|null $sortableName) : void
Parameters
$sortableName : string|null

setTimeZone()

public setTimeZone(string|null $timeZone) : void
Parameters
$timeZone : string|null

setTitle()

public setTitle(string|null $title) : void
Parameters
$title : string|null

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>
Return values
array<string|int, mixed>

        
On this page

Search results