Class to represent a platform user. More...
Public Member Functions | |
__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). | |
Data Fields | |
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. | |
Static Public Attributes | |
static | $allowEmptyName = false |
Allow user name field to be empty? | |
Class to represent a platform user.
__construct | ( | ) |
Class constructor.
Reimplemented in UserResult.
Definition at line 137 of file User.php.
References User\initialize().
initialise | ( | ) |
Initialise the user.
Synonym for initialize().
Definition at line 164 of file User.php.
References User\initialize().
initialize | ( | ) |
Initialise the user.
Reimplemented in UserResult.
Definition at line 145 of file User.php.
Referenced by User\__construct(), and User\initialise().
isAdmin | ( | ) |
isContentDeveloper | ( | ) |
Check if the user is a content developer.
Definition at line 272 of file User.php.
Referenced by User\isStaff().
isInstructor | ( | ) |
Check if the user is an instructor.
Definition at line 262 of file User.php.
Referenced by User\isStaff().
isLearner | ( | ) |
isManager | ( | ) |
isMember | ( | ) |
isMentor | ( | ) |
isOfficer | ( | ) |
isStaff | ( | ) |
Check if the user is staff.
Definition at line 322 of file User.php.
References User\isContentDeveloper(), User\isInstructor(), and User\isTeachingAssistant().
isTeachingAssistant | ( | ) |
Check if the user is a teaching assistant.
Definition at line 282 of file User.php.
Referenced by User\isStaff().
setEmail | ( | $email, | |
$defaultEmail = null |
|||
) |
Set the user's email address.
string | Email address value | |
string | null | $defaultEmail | Value to use if no email is provided (optional, default is none) |
Definition at line 229 of file User.php.
References User\$email.
setNames | ( | $firstname, | |
$lastname, | |||
$fullname, | |||
$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). |
Definition at line 177 of file User.php.
References User\$firstname, User\$fullname, User\$lastname, User\$ltiUserId, and User\$middlename.
|
static |
string $email = '' |
string $firstname = '' |
string $fullname = '' |
string $lastname = '' |
User's last name (surname or family name).
Definition at line 69 of file User.php.
Referenced by User\setNames().
string null $ltiUserId = null |
user ID as supplied in the last connection request.
Definition at line 132 of file User.php.
Referenced by UserResult\fromResourceLink(), UserResult\getId(), and User\setNames().
string $middlename = '' |