See WoltLab/com.woltlab.wbb#325
$list = [];
if ($this->parameters['data']['includeUserGroups']) {
- $accessibleGroups = UserGroup::getMentionableGroups();
+ if ($this->parameters['data']['scope'] === 'mention') {
+ $accessibleGroups = UserGroup::getMentionableGroups();
+ }
+ else {
+ $accessibleGroups = UserGroup::getAllGroups();
+ }
+
foreach ($accessibleGroups as $group) {
if (!empty($this->parameters['data']['restrictUserGroupIDs']) && !in_array($group->groupID, $this->parameters['data']['restrictUserGroupIDs'])) {
continue;
return $groups;
}
+
+ /**
+ * @return UserGroup[]
+ * @since 5.2
+ */
+ public static function getAllGroups() {
+ self::getCache();
+
+ return self::$cache['groups'];
+ }
}