Removes passwords edition rights from xnet admin for xnet accounts.
authorStéphane Jacob <sj@m4x.org>
Fri, 18 Mar 2011 22:21:57 +0000 (23:21 +0100)
committerStéphane Jacob <sj@m4x.org>
Sun, 20 Mar 2011 23:06:45 +0000 (00:06 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/xnetgrp.php
templates/xnetgrp/membres-edit.tpl

index 91ec6af..54e7938 100644 (file)
@@ -1014,13 +1014,6 @@ class XnetGrpModule extends PLModule
                            Post::t('full_name'), Post::t('directory_name'), Post::t('display_name'),
                            (Post::t('sex') == 'male') ? 'male' : 'female', Post::t('email'),
                            (Post::t('type') == 'xnet') ? 'xnet' : 'virtual', $user->id());
-                // If user is of type xnet and new password is given.
-                if (!Post::blank('pwhash') && Post::t('type') == 'xnet') {
-                    XDB::query('UPDATE  accounts
-                                   SET  password = {?}
-                                 WHERE  uid = {?}',
-                               Post::t('pwhash'), $user->id());
-                }
             } else if (!$user->perms) {
                 XDB::query('UPDATE  accounts
                                SET  email = {?}
@@ -1106,8 +1099,6 @@ class XnetGrpModule extends PLModule
         $res = XDB::rawFetchAllAssoc('SHOW COLUMNS FROM group_members LIKE \'position\'');
         $positions = str_replace(array('enum(', ')', '\''), '', $res[0]['Type']);
 
-        $page->addJsLink('password.js');
-        $page->assign('onlyGroup', ($user->groupCount() == 1));
         $page->assign('user', $user);
         $page->assign('listes', $mmlist->get_lists($user->forlifeEmail()));
         $page->assign('alias', $user->emailGroupAliases($globals->asso('mail_domain')));
index 0df7c6a..13ee689 100644 (file)
       </td>
     </tr>
     {if $user->type eq 'xnet'}
-    <tr class="impair" id="password">
-      <td class="titre">Mot de passe&nbsp;:</td>
-      <td>
-        <div style="float: left">
-          <input type="text" name="new_plain_password" size="10" maxlength="256" value="********" />
-          <input type="hidden" name="pwhash" value="" />
-        </div>
-        <div style="float: left; margin-top: 5px;">
-          {checkpasswd prompt="new_plain_password" submit="dummy_none"}
-        </div>
-        {if !$onlyGroup}
-        <div style="clear: both">
-          <small class="error">
-            Attention, cet utilisateur est inscrit à d'autres groupes, changer son mot de passe modifiera aussi ses accès aux autres groupes.
-          </small>
-        </div>
-        {/if}
-      </td>
-    </tr>
     <tr id="make_X">
       <td colspan="2">
         <span id="make_X_cb">