From 3d57237e2ce44f487ebef727aa957c63643f5c1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 19 Mar 2011 18:43:30 +0100 Subject: [PATCH] Displays all groups an xnet account is registered to in validation page. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/validations/account.inc.php | 7 +++++++ templates/include/form.valid.account.tpl | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/validations/account.inc.php b/include/validations/account.inc.php index 2ce9e09..a2617a8 100644 --- a/include/validations/account.inc.php +++ b/include/validations/account.inc.php @@ -28,6 +28,7 @@ class AccountReq extends Validate public $hruid; public $email; public $group; + public $groups; public $rules = "Accepter si l'adresse email parait correcte, et pas absurde (ou si le demandeur est de confiance). Si le demandeur marque sa propre @@ -46,6 +47,12 @@ class AccountReq extends Validate FROM accounts WHERE hruid = {?}', $hruid); + $this->groups = implode(',', XDB::fetchColumn('SELECT g.nom + FROM groups AS g + INNER JOIN group_members AS m ON (g.id = m.asso_id) + WHERE m.uid = {?} + ORDER BY g.nom', + $this->uid)); } // }}} diff --git a/templates/include/form.valid.account.tpl b/templates/include/form.valid.account.tpl index 0439369..99cebb5 100644 --- a/templates/include/form.valid.account.tpl +++ b/templates/include/form.valid.account.tpl @@ -21,10 +21,14 @@ {**************************************************************************} - Groupe : + Groupe demandeur : {$valid->group} + Tous les groupes : + {$valid->groups} + + Adresse email : {$valid->email} -- 2.1.4