diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-05-23 16:58:58 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-05-27 12:03:05 +0200 |
commit | c6c8a41d2f34a05dbb8b24b280c767b022a3c338 (patch) | |
tree | 45852452a236211e8126fce4557baa4aa435f0d2 /lib/private/Group | |
parent | 96e892770d0b37fab66f8b92c10866fadccf98c5 (diff) | |
download | nextcloud-server-c6c8a41d2f34a05dbb8b24b280c767b022a3c338.tar.gz nextcloud-server-c6c8a41d2f34a05dbb8b24b280c767b022a3c338.zip |
group display name support (service level + ldap)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Group')
-rw-r--r-- | lib/private/Group/Group.php | 10 |
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; |