SloodleUserA class to represent a single user, including Moodle and Sloodle data.
Located in /sloodle/lib/user.php (line 31)
object
$avatar_data
= null (line 49)
Internal only - avatar data.
In Moodle, corresponds to a record from the 'sloodle_users' table.
obejct
$user_data
= null (line 57)
Internal only - user data. (i.e. VLE user) In Moodle, corresponds to a record from the 'user' table.
object
$_session
= null (line 41)
Internal only - reference to the containing SloodleSession object.
Note: always check that it is not null before use!
Class constructor.
Adds a new avatar to the database, and link it to the specified user.
If successful, it deletes any matching avatar details from pending users list.
Adds a new unlinked avatar to the database (the entry is pending linking)
Auto-register a new user account for the current avatar.
NOTE: this does NOT respect ANYTHING but the most basic Moodle accounts. Use at your own risk!
Enrols the current user in the specified course
NOTE: a side effect of this is that it logs-in the user
Gets the timestamp of whenever the avatar was last active
Gets a numeric array of SloodleCourse objects for courses the user is enrolled in.
WARNING: this function is not very efficient, and will likely be very slow on large sites.
Gets a numeric array of SloodleCourse objects for courses the user is Sloodle staff.
This relates to the "mod/sloodle:staff" capability. WARNING: this function is not very efficient, and will likely be very slow on large sites.
Determines whether or not the current user and avatar are linked.
Is the current user enrolled in the specified course?
NOTE: a side effect of this is that it logs-in the user
Is the current user Sloodle staff in the specified course?
NOTE: a side effect of this is that it logs-in the user
Links the current avatar to the current user.
NOTE: does not remove any other avatar links to the VLE user.
Finds an avatar with the given UUID and/or name, and loads its data.
The UUID is searched for first. If that is not found, then the name is used.
Loads the specified avatar from the database.
Load the avatar linked to the current user.
Find the VLE user linked to the current avatar.
Load the specified user from the database
Internally 'log-in' the current user.
In Moodle, this just stores all the user data in the global $USER variable. This function will not perform automatic registration.
If the system is waiting to send a password notification to this user, then remove it
Resets the user's password
Sets the timestamp of when the user was last active
Sets the name of the avatar
Sets the UUID of the avatar
Documentation generated on Mon, 16 Jun 2008 15:57:04 +0100 by phpDocumentor 1.4.0