Class to represent a platform user. More...
Public Member Functions | |
__construct () | |
Class constructor. | |
void | initialize () |
Initialise the user. | |
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). | |
Public Attributes | |
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 Public Attributes | |
static bool | $allowEmptyName = false |
Allow user name field to be empty? | |
Class to represent a platform user.
ceLTIc\LTI\User::__construct | ( | ) |
Class constructor.
Reimplemented in ceLTIc\LTI\UserResult.
References $fullname, $lastname, and $middlename.
void ceLTIc\LTI\User::initialise | ( | ) |
Initialise the user.
Synonym for initialize().
void ceLTIc\LTI\User::initialize | ( | ) |
bool ceLTIc\LTI\User::isAdmin | ( | ) |
Check if the user is an administrator (at any of the system, institution or context levels).
bool ceLTIc\LTI\User::isContentDeveloper | ( | ) |
Check if the user is a content developer.
Referenced by isTeachingAssistant().
bool ceLTIc\LTI\User::isInstructor | ( | ) |
Check if the user is an instructor.
Referenced by isTeachingAssistant().
bool ceLTIc\LTI\User::isLearner | ( | ) |
Check if the user is a learner.
bool ceLTIc\LTI\User::isManager | ( | ) |
Check if the user is a manager.
bool ceLTIc\LTI\User::isMember | ( | ) |
Check if the user is a member.
bool ceLTIc\LTI\User::isMentor | ( | ) |
Check if the user is a mentor.
bool ceLTIc\LTI\User::isOfficer | ( | ) |
Check if the user is an officer.
bool ceLTIc\LTI\User::isStaff | ( | ) |
Check if the user is staff.
bool ceLTIc\LTI\User::isTeachingAssistant | ( | ) |
Check if the user is a teaching assistant.
References isContentDeveloper(), isInstructor(), and isTeachingAssistant().
Referenced by isTeachingAssistant().
void ceLTIc\LTI\User::setEmail | ( | ?string | $email, |
?string | $defaultEmail = null ) |
Set the user's email address.
stringnull | Email address value | |
string | null | $defaultEmail | Value to use if no email is provided (optional, default is none) |
void ceLTIc\LTI\User::setNames | ( | string | $firstname, |
string | $lastname, | ||
string | $fullname, | ||
?string | $middlename = null ) |
Set the user's name.
string | $firstname | User's first name. |
string | $lastname | User's last name. |
string | $fullname | User's full name. |
string | null | $middlename | User's middle name (optional, default is none). |
|
static |
Allow user name field to be empty?
string ceLTIc\LTI\User::$email = '' |
User's email address.
string ceLTIc\LTI\User::$firstname = '' |
User's first name.
string ceLTIc\LTI\User::$fullname = '' |
User's fullname.
Referenced by __construct(), and initialize().
array ceLTIc\LTI\User::$groups = [] |
Groups for user.
string ceLTIc\LTI\User::$image = '' |
User's image URI.
string ceLTIc\LTI\User::$lastname = '' |
User's last name (surname or family name).
Referenced by __construct().
string ceLTIc\LTI\User::$ltiUserId = null |
user ID as supplied in the last connection request.
Referenced by ceLTIc\LTI\UserResult\setDataConnector().
string ceLTIc\LTI\User::$middlename = '' |
User's middle name.
Referenced by __construct().
array ceLTIc\LTI\User::$roles = [] |
Roles for user.
string ceLTIc\LTI\User::$sourcedId = null |
User's sourcedId.
string ceLTIc\LTI\User::$username = null |
User's username.
const ceLTIc\LTI\User::PRINCIPAL_ROLES |
List of principal roles for LTI 1.3.