| @@ 216-223 (lines=8) @@ | ||
| 213 | ||
| 214 | $notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true); |
|
| 215 | $this->users = []; |
|
| 216 | foreach ($notifyGroups as $group) { |
|
| 217 | $groupToNotify = $this->groupManager->get($group); |
|
| 218 | if ($groupToNotify instanceof IGroup) { |
|
| 219 | foreach ($groupToNotify->getUsers() as $user) { |
|
| 220 | $this->users[$user->getUID()] = true; |
|
| 221 | } |
|
| 222 | } |
|
| 223 | } |
|
| 224 | ||
| 225 | $this->users = array_keys($this->users); |
|
| 226 | ||
| @@ 508-515 (lines=8) @@ | ||
| 505 | } |
|
| 506 | ||
| 507 | if (!empty($groups)) { |
|
| 508 | foreach ($groups as $gid) { |
|
| 509 | $group = $this->groupManager->get($gid); |
|
| 510 | if ($group instanceof IGroup) { |
|
| 511 | foreach ($group->getUsers() as $user) { |
|
| 512 | $users[] = $user->getUID(); |
|
| 513 | } |
|
| 514 | } |
|
| 515 | } |
|
| 516 | } |
|
| 517 | ||
| 518 | return array_unique($users); |
|