From: Stéphane Jacob Date: Sat, 19 Mar 2011 17:43:30 +0000 (+0100) Subject: Displays all groups an xnet account is registered to in validation page. X-Git-Tag: xorg/1.1.0~26^2~12 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3d57237e2ce44f487ebef727aa957c63643f5c1c;p=platal.git Displays all groups an xnet account is registered to in validation page. Signed-off-by: Stéphane Jacob --- 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}