summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-12 11:21:40 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-12 11:21:40 +0100
commitb68c376e8e4087d25f7df1d6c05e60c37b06497a (patch)
tree59b9b8a212b64bc7ed7f8160c7dc447425501d85 /settings
parent0b38a48bb4f1150710209577d15d8041574aa29a (diff)
parent7a8f95be2f92778c9e299e75e5ebfa29b773b497 (diff)
downloadnextcloud-server-b68c376e8e4087d25f7df1d6c05e60c37b06497a.tar.gz
nextcloud-server-b68c376e8e4087d25f7df1d6c05e60c37b06497a.zip
Merge pull request #13913 from rullzer/showusergroups
Added overview of groups a user is member of
Diffstat (limited to 'settings')
-rw-r--r--settings/personal.php6
-rw-r--r--settings/templates/personal.php8
2 files changed, 14 insertions, 0 deletions
diff --git a/settings/personal.php b/settings/personal.php
index f181c9cb2c1..7239df365f5 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -100,6 +100,12 @@ $tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true));
$tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
$tmpl->assign('certs', $certificateManager->listCertificates());
+// Get array of group ids for this user
+$groups = \OC::$server->getGroupManager()->getUserIdGroups(OC_User::getUser());
+$groups2 = array_map(function($group) { return $group->getGID(); }, $groups);
+sort($groups2);
+$tmpl->assign('groups', $groups2);
+
// add hardcoded forms from the template
$l = OC_L10N::get('settings');
$formsAndMore = array();
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 3bd5971f44e..02e61287937 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -136,6 +136,14 @@ if($_['passwordChangeSupported']) {
}
?>
+<div id="groups" class="section">
+ <h2><?php p($l->t('Groups')); ?></h2>
+ <p><?php p($l->t('You are member of the following groups:')); ?></p>
+ <p>
+ <?php p(implode(', ', $_['groups'])); ?>
+ </p>
+</div>
+
<?php if ($_['enableAvatars']): ?>
<form id="avatar" class="section" method="post" action="<?php p(\OC_Helper::linkToRoute('core_avatar_post')); ?>">
<h2><?php p($l->t('Profile picture')); ?></h2>