Merge branch 'MDL-80832-403' of https://github.com/davewoloszyn/moodle into MOODLE_403_STABLE
This commit is contained in:
@@ -598,12 +598,6 @@ class communication_feature implements
|
||||
$currentpowerlevels = $this->get_current_powerlevel_data();
|
||||
$currentuserpowerlevels = (array) $currentpowerlevels->users ?? [];
|
||||
|
||||
// Ensure each user entry is an array.
|
||||
$currentuserpowerlevels = array_map(
|
||||
fn ($user) => (array) $user,
|
||||
$currentuserpowerlevels,
|
||||
);
|
||||
|
||||
// Get all the current users who need to be in the room.
|
||||
$userlist = $this->processor->get_all_userids_for_instance();
|
||||
|
||||
@@ -662,10 +656,7 @@ class communication_feature implements
|
||||
private function get_users_with_custom_power_level(array $users): array {
|
||||
return array_filter(
|
||||
$users,
|
||||
function ($user): bool {
|
||||
// Isolate the level value.
|
||||
$level = array_values($user);
|
||||
$level = reset($level);
|
||||
function ($level): bool {
|
||||
switch ($level) {
|
||||
case matrix_constants::POWER_LEVEL_DEFAULT:
|
||||
case matrix_constants::POWER_LEVEL_MOODLE_SITE_ADMIN:
|
||||
|
||||
Reference in New Issue
Block a user