Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Privacy class for requesting user data.

Copyright: 2018 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 558 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider  - X-Ref

Privacy class for requesting user data.

get_metadata(collection $collection)   X-Ref
Returns information about the user data stored in this component.

param: collection $collection A list of information about this component
return: collection The collection object filled out with information about this component.

get_contexts_for_userid(int $userid)   X-Ref
Get the list of contexts that contain user information for the specified user.

param: int $userid The user to search.
return: contextlist $contextlist The contextlist containing the list of contexts used in this plugin.

get_users_in_context(userlist $userlist)   X-Ref
Get the list of users within a specific context.

param: userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.

export_user_data(approved_contextlist $contextlist)   X-Ref
Export all user data for the specified user, in the specified contexts.

param: approved_contextlist $contextlist The approved contexts to export information for.

delete_data_for_all_users_in_context(\context $context)   X-Ref
Delete all data for all users in the specified context.

param: context $context The specific context to delete data for.

delete_data_for_users(approved_userlist $userlist)   X-Ref
Delete multiple users within a single context.

param: approved_userlist $userlist The approved context and user information to delete information for.

delete_data_for_user(approved_contextlist $contextlist)   X-Ref
Delete all user data for the specified user, in the specified contexts.

param: approved_contextlist $contextlist The approved contexts and user information to delete information for.

delete_user_data(int $userid, \context $context)   X-Ref
Deletes non vital information about a user.

param: int      $userid  The user ID to delete
param: \context $context The user context

export_user(\stdClass $user, \context $context)   X-Ref
Export core user data.

param: \stdClass $user The user object.
param: \context $context The user context.

export_lastaccess(int $userid, \context $context)   X-Ref
Export information about the last time a user accessed a course.

param: int $userid The user ID.
param: \context $context The user context.

export_password_resets(int $userid, \context $context)   X-Ref
Exports information about password resets.

param: int $userid The user ID
param: \context $context Context for this user.

export_user_devices(int $userid, \context $context)   X-Ref
Exports information about the user's mobile devices.

param: int $userid The user ID.
param: \context $context Context for this user.

export_course_requests(int $userid, \context $context)   X-Ref
Exports information about course requests this user made.

param: int    $userid  The user ID.
param: \context $context The context object

export_password_history(int $userid, \context $context)   X-Ref
Get details about the user's password history.

param: int $userid The user ID that we are getting the password history for.
param: \context $context the user context.

export_user_session_data(int $userid, \context $context)   X-Ref
Exports information about the user's session.

param: int $userid The user ID.
param: \context $context The context for this user.