From 58328dc0a9ef01044bb0ad81c6d66c1b841616be Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 18 Mar 2011 23:21:57 +0100 Subject: [PATCH] Removes passwords edition rights from xnet admin for xnet accounts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/xnetgrp.php | 9 --------- templates/xnetgrp/membres-edit.tpl | 19 ------------------- 2 files changed, 28 deletions(-) diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 91ec6af..54e7938 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -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'))); diff --git a/templates/xnetgrp/membres-edit.tpl b/templates/xnetgrp/membres-edit.tpl index 0df7c6a..13ee689 100644 --- a/templates/xnetgrp/membres-edit.tpl +++ b/templates/xnetgrp/membres-edit.tpl @@ -158,25 +158,6 @@ {if $user->type eq 'xnet'} - - Mot de passe : - -
- - -
-
- {checkpasswd prompt="new_plain_password" submit="dummy_none"} -
- {if !$onlyGroup} -
- - Attention, cet utilisateur est inscrit à d'autres groupes, changer son mot de passe modifiera aussi ses accès aux autres groupes. - -
- {/if} - - -- 2.1.4