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