MDL-78129 core_communication: Add update membership api

This commit is contained in:
Safat
2023-09-21 13:28:20 +08:00
committed by Andrew Nicols
parent 9890e67e6d
commit 3e47253787
8 changed files with 222 additions and 4 deletions
+24
View File
@@ -171,6 +171,21 @@ class processor {
);
}
/**
* Get all the user ids flagged as deleted.
*
* @return array
*/
public function get_all_delete_flagged_userids(): array {
global $DB;
return $DB->get_fieldset_select(
'communication_user',
'userid',
'commid = ? AND deleted = ?',
[$this->instancedata->id, 1]
);
}
/**
* Create communication user record for mapping and sync.
*
@@ -400,6 +415,15 @@ class processor {
/**
* Get communication instance id.
*
* @return int
*/
public function get_instance_id(): int {
return $this->instancedata->instanceid;
}
/**
* Get communication instance component.
*
* @return string
*/
public function get_component(): string {