User
class User
This is a class to provide access to the resource context level data.
This data comes from the LTI launch from the LMS. A context is the equivalent of a "class" or course. A context has a roster of users and each user has a role within the context. A launch may or may not contain a context. If there is a link without a context, it is a "system-wide" link like "view profile" or "show all courses"
Traits
Properties
protected | $TABLE_NAME | ||
protected | $PRIMARY_KEY | ||
protected | $ENTITY_NAME | ||
$launch | |||
$id | The integer primary key for this user in the 'lti_user' table. | ||
$key | The logical key for this user in the 'lti_user' table. | ||
The user's email | |||
$displayname | The user's display name | ||
$firstname | The user's first name | ||
$lastname | The user's last name | ||
$locale | The User's Locale | ||
$image | The User's Image / Avatar | ||
$instructor | Is the user an instructor? | ||
$admin | Is the user an administrator? |
Methods
Construct the user's name / email combination
Get the user's first name, falling back to email
Load a user's info from the user_id
Load a user's info from the user's subbect
Details
in JsonTrait at line 21
string
getJson()
Load the json field for this entity
in JsonTrait at line 43
getJsonKeyLegacy($key, $default = false)
in JsonTrait at line 61
getJsonKey($key, $default = false)
Get a JSON key for this entity
in JsonTrait at line 78
setJson($json)
Set the JSON entry for this entity
in JsonTrait at line 96
setJsonKey($key, $value)
Set/update a JSON key for this entity
in JsonTrait at line 114
setJsonKeys($values)
Set/update an array of JSON keys for this entity
at line 88
getNameAndEmail()
Construct the user's name / email combination
at line 109
getFirstName($displayname = null)
Get the user's first name, falling back to email
at line 123
static
loadUserInfoBypass($user_id)
Load a user's info from the user_id
We make sure that the user is a member of the current context so as not to slide across silos.
at line 150
loadUserInfoBypassBySubject($user_subject)
Load a user's info from the user's subbect
We make sure that the user is a member of the current context and key so as not to slide across silos.