|
static | add_contexts_for_conversations (contextlist $contextlist, int $userid, string $component, string $itemtype, int $itemid=0) |
| Provide a list of contexts which have conversations for the user, in the respective area (component/itemtype combination).
|
|
static | add_conversations_in_context (userlist $userlist, string $component, string $itemtype, int $itemid=0) |
| Add the list of users who have a conversation in the specified area (component + itemtype + itemid).
|
|
static | delete_conversations_for_all_users (\context $context, string $component, string $itemtype, int $itemid=0) |
| Deletes all group memberships for a specified context and component.
|
|
static | delete_conversations_for_user (approved_contextlist $contextlist, string $component, string $itemtype, int $itemid=0) |
| Deletes all records for a user from a list of approved contexts.
|
|
static | delete_conversations_for_users (approved_userlist $userlist, string $component, string $itemtype, int $itemid=0) |
| Deletes all records for multiple users within a single context.
|
|
static | delete_data_for_all_users_in_context (\context $context) |
| Delete all data for all users in the specified context.
|
|
static | delete_data_for_user (approved_contextlist $contextlist) |
| Delete all user data for the specified user, in the specified contexts.
|
|
static | delete_data_for_users (approved_userlist $userlist) |
| Delete multiple users within a single context.
|
|
static | export_conversations (int $userid, string $component, string $itemtype, context $context, array $subcontext=[], int $itemid=0) |
| Store all conversations which match the specified component, itemtype, and itemid.
|
|
static | export_user_data (approved_contextlist $contextlist) |
| Export personal data for the given approved_contextlist.
|
|
static | export_user_preferences (int $userid) |
| Store all user preferences for core message.
|
|
static | get_contexts_for_userid (int $userid) |
| Get the list of contexts that contain user information for the specified user.
|
|
static | get_metadata (collection $items) |
| Return the fields which contain personal data.
|
|
static | get_users_in_context (userlist $userlist) |
| Get the list of users who have data within a context.
|
|
Privacy Subsystem implementation for core_message.
- Copyright
- 2018 Mark Nelson markn.nosp@m.@moo.nosp@m.dle.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
static core_message\privacy\provider::add_contexts_for_conversations |
( |
contextlist | $contextlist, |
|
|
int | $userid, |
|
|
string | $component, |
|
|
string | $itemtype, |
|
|
int | $itemid = 0 ) |
|
static |
Provide a list of contexts which have conversations for the user, in the respective area (component/itemtype combination).
This method is to be called by consumers of the messaging subsystem (plugins), in their get_contexts_for_userid() method, to add the contexts for items which may have any conversation, but would normally not be reported as having user data by the plugin responsible for them.
- Parameters
-
contextlist | $contextlist | |
int | $userid | The id of the user in scope. |
string | $component | the frankenstyle component name. |
string | $itemtype | the type of the conversation items. |
int | $itemid | Optional itemid associated with component. |
static core_message\privacy\provider::delete_conversations_for_user |
( |
approved_contextlist | $contextlist, |
|
|
string | $component, |
|
|
string | $itemtype, |
|
|
int | $itemid = 0 ) |
|
static |
Deletes all records for a user from a list of approved contexts.
When the component and the itemtype are empty and there is only one user context in the list, all the conversations without contextid will be removed. However, if the component and itemtype are defined, only the conversations in these area for the contexts in $contextlist wil be deleted.
- Parameters
-
approved_contextlist | $contextlist | Contains the user ID and a list of contexts to be deleted from. |
string | $component | The component to delete. Empty string means no component. |
string | $itemtype | The itemtype of the component to delele. Empty string means no itemtype. |
int | $itemid | Optional itemid associated with component. |
static core_message\privacy\provider::export_conversations |
( |
int | $userid, |
|
|
string | $component, |
|
|
string | $itemtype, |
|
|
context | $context, |
|
|
array | $subcontext = [], |
|
|
int | $itemid = 0 ) |
|
static |
Store all conversations which match the specified component, itemtype, and itemid.
Conversations without context (for now, the private ones) are stored in '<$context> | Messages | <Other user id>'. Conversations with context are stored in '<$context> | Messages | <Conversation item type> | <Conversation name>'.
- Parameters
-
int | $userid | The user whose information is to be exported. |
string | $component | The component to fetch data from. |
string | $itemtype | The itemtype that the data was exported in within the component. |
context | $context | The context to export for. |
array | $subcontext | The sub-context in which to export this data. |
int | $itemid | Optional itemid associated with component. |