summaryrefslogtreecommitdiffstats
path: root/lib/private/Group/Group.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Group/Group.php')
-rw-r--r--lib/private/Group/Group.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php
index 3876c575968..a50a5ffde78 100644
--- a/lib/private/Group/Group.php
+++ b/lib/private/Group/Group.php
@@ -30,6 +30,7 @@
namespace OC\Group;
+use OCP\Group\Backend\IGetDisplayNameBackend;
use OCP\Group\Backend\IHideFromCollaborationBackend;
use OC\Hooks\PublicEmitter;
use OCP\GroupInterface;
@@ -86,6 +87,15 @@ class Group implements IGroup {
public function getDisplayName() {
if (is_null($this->displayName)) {
+ foreach ($this->backends as $backend) {
+ if ($backend instanceof IGetDisplayNameBackend) {
+ $displayName = $backend->getDisplayName($this->gid);
+ if (trim($displayName) !== '') {
+ $this->displayName = $displayName;
+ return $this->displayName;
+ }
+ }
+ }
return $this->gid;
}
return $this->displayName;