Only xnet and virtual accounts should be edited through xnet.
authorStéphane Jacob <sj@m4x.org>
Wed, 9 Feb 2011 15:06:26 +0000 (16:06 +0100)
committerStéphane Jacob <sj@m4x.org>
Wed, 9 Feb 2011 15:06:26 +0000 (16:06 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/xnetgrp.php
templates/xnetgrp/membres-edit.tpl

index 9274953..ba61966 100644 (file)
@@ -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 = {?}
index 52256fb..a9c2ea5 100644 (file)
@@ -76,7 +76,7 @@
         </select>
       </td>
     </tr>
-    {if !$user->profile()}
+    {if $user->type eq 'virtual' || $user->type eq 'xnet'}
     <tr class="impair">
       <td class="titre">
         Type d'utilisateur&nbsp;:
         </select>
       </td>
     </tr>
-    {/if}
-    {if !$user->profile() || !$user->perms}
+    {if !$user->perms}
     <tr class="impair">
       <td class="titre">
         Email&nbsp;:
       </td>
     </tr>
     {/if}
+    {/if}
     <tr class="impair">
       <td class="titre">
         Commentaire&nbsp;: