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). | |
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.
References $firstname, $fullname, $lastname, and $middlename.
| void initialise | ( | ) |
Initialise the user.
Synonym for initialize().
| void initialize | ( | ) |
Initialise the user.
Reimplemented in UserResult.
| 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.
References isContentDeveloper(), isInstructor(), and isTeachingAssistant().
Referenced by isContentDeveloper().
| bool isInstructor | ( | ) |
Check if the user is an instructor.
Referenced by isContentDeveloper().
| 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.
Referenced by isContentDeveloper().
| void 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 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). |
References $email.