Class to represent a platform user association with a resource link. More...
Public Member Functions | |
| __construct () | |
| Class constructor. | |
| initialize () | |
| Initialise the user. | |
| save () | |
| Save the user to the database. | |
| delete () | |
| Delete the user from the database. | |
| getResourceLink () | |
| Get resource link. | |
| setResourceLink ($resourceLink) | |
| Set resource link. | |
| getRecordId () | |
| Get record ID of user. | |
| setRecordId ($id) | |
| Set record ID of user. | |
| setResourceLinkId ($resourceLinkId) | |
| Set resource link ID of user. | |
| getDataConnector () | |
| Get the data connector. | |
| setDataConnector ($dataConnector) | |
| Set the data connector. | |
| getId ($idScope=null, $source=null) | |
| Get the user ID (which may be a compound of the platform and resource link IDs). | |
Public Member Functions inherited from User | |
| __construct () | |
| Class constructor. | |
| initialize () | |
| Initialise the user. | |
| initialise () | |
| Initialise the user. | |
| setNames ($firstname, $lastname, $fullname, $middlename=null) | |
| Set the user's name. | |
| setEmail ($email, $defaultEmail=null) | |
| Set the user's email address. | |
| isLearner () | |
| Check if the user is a learner. | |
| isInstructor () | |
| Check if the user is an instructor. | |
| isContentDeveloper () | |
| Check if the user is a content developer. | |
| isTeachingAssistant () | |
| Check if the user is a teaching assistant. | |
| isManager () | |
| Check if the user is a manager. | |
| isMember () | |
| Check if the user is a member. | |
| isOfficer () | |
| Check if the user is an officer. | |
| isStaff () | |
| Check if the user is staff. | |
| isMentor () | |
| Check if the user is a mentor. | |
| isAdmin () | |
| Check if the user is an administrator (at any of the system, institution or context levels). | |
Static Public Member Functions | |
| static | fromRecordId ($id, $dataConnector) |
| Load the user from the database. | |
| static | fromResourceLink ($resourceLink, $ltiUserId) |
| Class constructor from resource link. | |
Data Fields | |
| $ltiResultSourcedId = null | |
| UserResult's result sourcedid. | |
| $created = null | |
| Date/time the record was created. | |
| $updated = null | |
| Date/time the record was last updated. | |
Data Fields inherited from User | |
| const | PRINCIPAL_ROLES |
| List of principal roles for LTI 1.3. | |
| $firstname = '' | |
| User's first name. | |
| $middlename = '' | |
| User's middle name. | |
| $lastname = '' | |
| User's last name (surname or family name). | |
| $fullname = '' | |
| User's fullname. | |
| $sourcedId = null | |
| User's sourcedId. | |
| $username = null | |
| User's username. | |
| $email = '' | |
| User's email address. | |
| $image = '' | |
| User's image URI. | |
| $roles = array() | |
| Roles for user. | |
| $groups = array() | |
| Groups for user. | |
| $ltiUserId = null | |
| user ID as supplied in the last connection request. | |
Additional Inherited Members | |
Static Public Attributes inherited from User | |
| static | $allowEmptyName = false |
| Allow user name field to be empty? | |
Class to represent a platform user association with a resource link.
Definition at line 16 of file UserResult.php.
| __construct | ( | ) |
Class constructor.
Reimplemented from User.
Definition at line 71 of file UserResult.php.
References UserResult\initialize().
| delete | ( | ) |
Delete the user from the database.
Definition at line 108 of file UserResult.php.
References UserResult\getDataConnector().
|
static |
Load the user from the database.
| int | $id | Record ID of user |
| DataConnector | $dataConnector | Database connection object |
Definition at line 261 of file UserResult.php.
|
static |
Class constructor from resource link.
| ResourceLink | null | $resourceLink | ResourceLink object |
| string | $ltiUserId | UserResult ID value |
Definition at line 278 of file UserResult.php.
References User\$ltiUserId.
Referenced by ResourceLink\getMemberships().
| getDataConnector | ( | ) |
Get the data connector.
Definition at line 175 of file UserResult.php.
Referenced by UserResult\delete(), UserResult\getResourceLink(), and UserResult\save().
| getId | ( | $idScope = null, |
|
$source = null |
|||
| ) |
Get the user ID (which may be a compound of the platform and resource link IDs).
| int | $idScope | Scope to use for user ID (optional, default is null for consumer default setting) |
| Context | Platform | null | $source | Context or Platform for user (optional) |
Definition at line 198 of file UserResult.php.
References User\$ltiUserId, UserResult\getResourceLink(), Tool\ID_SCOPE_CONTEXT, Tool\ID_SCOPE_GLOBAL, Tool\ID_SCOPE_ID_ONLY, Tool\ID_SCOPE_RESOURCE, and Tool\ID_SCOPE_SEPARATOR.
| getRecordId | ( | ) |
Get record ID of user.
Definition at line 144 of file UserResult.php.
| getResourceLink | ( | ) |
Get resource link.
Definition at line 120 of file UserResult.php.
References ResourceLink\fromRecordId(), and UserResult\getDataConnector().
Referenced by UserResult\getId().
| initialize | ( | ) |
Initialise the user.
Reimplemented from User.
Definition at line 79 of file UserResult.php.
Referenced by UserResult\__construct().
| save | ( | ) |
Save the user to the database.
Definition at line 92 of file UserResult.php.
References UserResult\getDataConnector().
| setDataConnector | ( | $dataConnector | ) |
Set the data connector.
| DataConnector | null | $dataConnector | Data connector object |
Definition at line 185 of file UserResult.php.
| setRecordId | ( | $id | ) |
Set record ID of user.
| int | null | $id | Record ID of user |
Definition at line 154 of file UserResult.php.
| setResourceLink | ( | $resourceLink | ) |
Set resource link.
| ResourceLink | $resourceLink | Resource link object |
Definition at line 134 of file UserResult.php.
| setResourceLinkId | ( | $resourceLinkId | ) |
Set resource link ID of user.
| int | null | $resourceLinkId | Resource link ID of user |
Definition at line 164 of file UserResult.php.
| int null $created = null |
Date/time the record was created.
Definition at line 31 of file UserResult.php.
| string null $ltiResultSourcedId = null |
UserResult's result sourcedid.
Definition at line 24 of file UserResult.php.
| int null $updated = null |
Date/time the record was last updated.
Definition at line 38 of file UserResult.php.