summaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-05-23 16:58:58 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-05-27 12:03:05 +0200
commitc6c8a41d2f34a05dbb8b24b280c767b022a3c338 (patch)
tree45852452a236211e8126fce4557baa4aa435f0d2 /lib/private/Group
parent96e892770d0b37fab66f8b92c10866fadccf98c5 (diff)
downloadnextcloud-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.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;