Profile
in package
User Profile object
Represents a user's profile information in Canvas LMS. Contains extended user information beyond the basic User object.
Table of Contents
Properties
- $avatarUrl : string|null
- $bio : string|null
- $calendar : array<string, mixed>|null
- $canUpdateName : bool|null
- $effectiveLocale : string|null
- $id : int
- $integrationId : string|null
- $lastLogin : string|null
- $locale : string|null
- $loginId : string|null
- $name : string
- $primaryEmail : string|null
- $shortName : string
- $sisUserId : string|null
- $sortableName : string
- $timeZone : string|null
- $title : string|null
Methods
- __construct() : mixed
- Constructor
- hasAvatar() : bool
- Check if user has an avatar
- hasBio() : bool
- Check if user has a bio
- hasTitle() : bool
- Check if user has a title
- toArray() : array<string, mixed>
- Convert to array
Properties
$avatarUrl
public
string|null
$avatarUrl
= null
Avatar URL
$bio
public
string|null
$bio
= null
User's bio
$calendar
public
array<string, mixed>|null
$calendar
= null
Calendar data
$canUpdateName
public
bool|null
$canUpdateName
= null
Whether user can update their name
$effectiveLocale
public
string|null
$effectiveLocale
= null
User's effective locale
$id
public
int
$id
User ID
$integrationId
public
string|null
$integrationId
= null
User's integration ID
$lastLogin
public
string|null
$lastLogin
= null
Last login timestamp
$locale
public
string|null
$locale
= null
User's locale
$loginId
public
string|null
$loginId
= null
User's login ID
$name
public
string
$name
User's name
$primaryEmail
public
string|null
$primaryEmail
= null
User's primary email
$shortName
public
string
$shortName
User's short name
$sisUserId
public
string|null
$sisUserId
= null
User's SIS ID
$sortableName
public
string
$sortableName
User's sortable name
$timeZone
public
string|null
$timeZone
= null
User's time zone
$title
public
string|null
$title
= null
User's title
Methods
__construct()
Constructor
public
__construct([array<string, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string, mixed> = []
hasAvatar()
Check if user has an avatar
public
hasAvatar() : bool
Return values
boolhasBio()
Check if user has a bio
public
hasBio() : bool
Return values
boolhasTitle()
Check if user has a title
public
hasTitle() : bool
Return values
booltoArray()
Convert to array
public
toArray() : array<string, mixed>