From b42417f4de7e44f1a2574af5cc6a91306a28bced Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 9 Feb 2011 16:06:26 +0100 Subject: [PATCH] Only xnet and virtual accounts should be edited through xnet. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/xnetgrp.php | 2 +- templates/xnetgrp/membres-edit.tpl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 9274953..ba61966 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -892,7 +892,7 @@ class XnetGrpModule extends PLModule // Update user info $email_changed = (!$user->profile() && strtolower($user->forlifeEmail()) != strtolower(Post::v('email'))); $from_email = $user->forlifeEmail(); - if (!$user->profile()) { + if ($user->type == 'virtual' || $user->type == 'xnet') { XDB::query('UPDATE accounts SET full_name = {?}, directory_name = {?}, display_name = {?}, sex = {?}, email = {?}, type = {?} diff --git a/templates/xnetgrp/membres-edit.tpl b/templates/xnetgrp/membres-edit.tpl index 52256fb..a9c2ea5 100644 --- a/templates/xnetgrp/membres-edit.tpl +++ b/templates/xnetgrp/membres-edit.tpl @@ -76,7 +76,7 @@ - {if !$user->profile()} + {if $user->type eq 'virtual' || $user->type eq 'xnet'} Type d'utilisateur : @@ -123,8 +123,7 @@ - {/if} - {if !$user->profile() || !$user->perms} + {if !$user->perms} Email : @@ -134,6 +133,7 @@ {/if} + {/if} Commentaire : -- 2.1.4