Class to represent a platform user association with a resource link.
More...
|
| __construct () |
| Class constructor.
|
|
void | initialize () |
| Initialise the user.
|
|
bool | save () |
| Save the user to the database.
|
|
bool | delete () |
| Delete the user from the database.
|
|
ResourceLink null | getResourceLink () |
| Get resource link.
|
|
void | setResourceLink (ResourceLink $resourceLink) |
| Set resource link.
|
|
int null | getRecordId () |
| Get record ID of user.
|
|
void | setRecordId (?int $id) |
| Set record ID of user.
|
|
void | setResourceLinkId (?int $resourceLinkId) |
| Set resource link ID of user.
|
|
DataConnector null | getDataConnector () |
| Get the data connector.
|
|
void | setDataConnector (?DataConnector $dataConnector) |
| Set the data connector.
|
|
string null | getId (?IdScope $idScope=null, Context|Platform|null $source=null) |
| Get the user ID (which may be a compound of the platform and resource link IDs).
|
|
void | initialise () |
| Initialise the user.
|
|
void | setNames (string $firstname, string $lastname, string $fullname, ?string $middlename=null) |
| Set the user's name.
|
|
void | setEmail (?string $email, ?string $defaultEmail=null) |
| Set the user's email address.
|
|
bool | isLearner () |
| Check if the user is a learner.
|
|
bool | isInstructor () |
| Check if the user is an instructor.
|
|
bool | isContentDeveloper () |
| Check if the user is a content developer.
|
|
bool | isTeachingAssistant () |
| Check if the user is a teaching assistant.
|
|
bool | isManager () |
| Check if the user is a manager.
|
|
bool | isMember () |
| Check if the user is a member.
|
|
bool | isOfficer () |
| Check if the user is an officer.
|
|
bool | isStaff () |
| Check if the user is staff.
|
|
bool | isMentor () |
| Check if the user is a mentor.
|
|
bool | isAdmin () |
| Check if the user is an administrator (at any of the system, institution or context levels).
|
|
|
string | $ltiResultSourcedId = null |
| UserResult's result sourcedid.
|
|
int | $created = null |
| Date/time the record was created.
|
|
int | $updated = null |
| Date/time the record was last updated.
|
|
const | PRINCIPAL_ROLES |
| List of principal roles for LTI 1.3.
|
|
string | $firstname = '' |
| User's first name.
|
|
string | $middlename = '' |
| User's middle name.
|
|
string | $lastname = '' |
| User's last name (surname or family name).
|
|
string | $fullname = '' |
| User's fullname.
|
|
string | $sourcedId = null |
| User's sourcedId.
|
|
string | $username = null |
| User's username.
|
|
string | $email = '' |
| User's email address.
|
|
string | $image = '' |
| User's image URI.
|
|
array | $roles = [] |
| Roles for user.
|
|
array | $groups = [] |
| Groups for user.
|
|
string | $ltiUserId = null |
| user ID as supplied in the last connection request.
|
|
|
static bool | $allowEmptyName = false |
| Allow user name field to be empty?
|
|
Class to represent a platform user association with a resource link.
- Author
- Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
- Copyright
- SPV Software Products
- Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3
◆ __construct()
◆ delete()
Delete the user from the database.
- Returns
- bool True if the user object was successfully deleted
◆ fromRecordId()
static UserResult fromRecordId |
( |
int | $id, |
|
|
DataConnector | $dataConnector ) |
|
static |
Load the user from the database.
- Parameters
-
int | $id | Record ID of user |
DataConnector | $dataConnector | Database connection object |
- Returns
- UserResult UserResult object
◆ fromResourceLink()
Class constructor from resource link.
- Parameters
-
ResourceLink | null | $resourceLink | ResourceLink object |
string | $ltiUserId | UserResult ID value |
- Returns
- UserResult UserResult object
◆ getDataConnector()
DataConnector null getDataConnector |
( |
| ) |
|
◆ getId()
◆ getRecordId()
◆ getResourceLink()
◆ initialize()
◆ save()
Save the user to the database.
- Returns
- bool True if the user object was successfully saved
◆ setDataConnector()
void setDataConnector |
( |
?DataConnector | $dataConnector | ) |
|
Set the data connector.
- Parameters
-
DataConnector | null | $dataConnector | Data connector object |
References User\$ltiUserId.
◆ setRecordId()
void setRecordId |
( |
?int | $id | ) |
|
◆ setResourceLink()
Set resource link.
- Parameters
-
ResourceLink | $resourceLink | Resource link object |
◆ setResourceLinkId()
void setResourceLinkId |
( |
?int | $resourceLinkId | ) |
|
Set resource link ID of user.
- Parameters
-
int | null | $resourceLinkId | Resource link ID of user |