Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Privacy class for requesting user data.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 170 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

provider:: (4 methods):
  get_metadata()
  get_user_contexts_with_script()
  export_userkeys()
  delete_userkeys()


Class: provider  - X-Ref

Privacy class for requesting user data.

get_metadata(collection $collection)   X-Ref
Returns meta data about this system.

return: collection     A listing of user data stored through this system.
param: collection     $collection The initialised collection to add items to.

get_user_contexts_with_script(userlist $userlist, \context $context, string $script,int $instance = null)   X-Ref
Get the list of users within a specific context for this system.

param: userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
param: context $context The context.
param: string $script The unique target identifier.
param: int $instance The instance ID.

export_userkeys(\context $context, array $subcontext, string $script, $instance = null)   X-Ref
Exports the data relating to user keys for the specified scripts and instance, within the specified
context/subcontext.

param: \context         $context Context owner of the data.
param: array            $subcontext Context owner of the data.
param: string           $script The owner of the data (usually a component name).
param: int              $instance The instance owner of the data.

delete_userkeys(string $script, $userid = null, $instance = null)   X-Ref
Deletes all userkeys for a script.

param: string           $script The owner of the data (usually a component name).
param: int              $userid The owner of the data.
param: int              $instance The instance owner of the data.