From 1d889ac45069d56f9ef4bcbf94b444d087004c7c Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 3 Oct 2010 22:27:35 +0200 Subject: [PATCH] Add the list of the groups of the user and the lists of the mailing lists of the user on admin/user. Signed-off-by: Florent Bruneau --- classes/user.php | 2 +- modules/admin.php | 4 ++++ templates/admin/user.tpl | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/classes/user.php b/classes/user.php index ea182ef..60919a3 100644 --- a/classes/user.php +++ b/classes/user.php @@ -611,7 +611,7 @@ class User extends PlUser $result = array(); foreach ($this->groups as $id=>$data) { if ($institutions) { - if ($data['cat'] != Goup::CAT_GROUPESX && $data['cat'] != Group::CAT_INSTITUTIONS) { + if ($data['cat'] != Group::CAT_GROUPESX && $data['cat'] != Group::CAT_INSTITUTIONS) { continue; } } diff --git a/modules/admin.php b/modules/admin.php index 81c1684..da4b804 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -671,6 +671,10 @@ class AdminModule extends PLModule $page->assign('lastlogin', $lastlogin); $page->assign('host', $host); + // Display mailing lists + $list = new MMList(S::user()); + $page->assign('mlists', $list->get_all_user_lists($user->forlifeEmail())); + // Display active aliases. $page->assign('virtuals', $user->emailAliases()); $page->assign('aliases', XDB::iterator("SELECT alias, type='a_vie' AS for_life, diff --git a/templates/admin/user.tpl b/templates/admin/user.tpl index 0b98fff..ece9ad6 100644 --- a/templates/admin/user.tpl +++ b/templates/admin/user.tpl @@ -303,6 +303,26 @@ $(document).ready(function() { +

Groupes dont l'utilisateur est membre

+ + + + + + + {foreach from=$user->groups() item=group} + + + + + {/foreach} +
Nom du groupePermissions
{$group.nom} + {$group.perms} + + {icon name="user_edit" title="Modifier l'inscription"} + +
+
@@ -447,6 +467,28 @@ $(document).ready(function() { + + + {foreach from=$mlists item=mlist} + + + + + + {/foreach} +
Mailing lists auquelles l'utilisateur appartient
+ + {$mlist.addr} + + + Membre + + Modérateur +
+ +
+ + {foreach from=$virtuals item=virtual} -- 2.1.4
Virtual aliases auquel l'utilisateur appartient