From: Stéphane Jacob Date: Fri, 18 Mar 2011 22:21:57 +0000 (+0100) Subject: Removes passwords edition rights from xnet admin for xnet accounts. X-Git-Tag: xorg/1.1.0~26^2~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=58328dc0a9ef01044bb0ad81c6d66c1b841616be;p=platal.git Removes passwords edition rights from xnet admin for xnet accounts. Signed-off-by: Stéphane Jacob --- 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} - -