Skip to content

Commit

Permalink
Fix #10887: Remove "Reset Password" button on User Edit Page when usi…
Browse files Browse the repository at this point in the history
…ng LDAP

With LDAP, Mantis is not controlling the password, so resetting it does not make
sense (i.e. be consistent with behavior in My Account page)

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
  • Loading branch information
dregad authored and davidhicks committed Dec 25, 2010
1 parent a957378 commit f10c878
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions manage_user_edit_page.php
Expand Up @@ -95,7 +95,7 @@
<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="user_id" value="<?php echo string_attribute( $t_user['id'] ) ?>" />
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<?php echo lang_get( 'edit_user_title' ) ?>
</td>
</tr>
Expand Down Expand Up @@ -206,12 +206,15 @@

<!-- RESET AND DELETE -->
<div class="border center">

<!-- Reset Button -->
<?php if( !$t_ldap ) { ?>
<form method="post" action="manage_user_reset.php">
<?php echo form_security_field( 'manage_user_reset' ) ?>
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<input type="submit" class="button" value="<?php echo lang_get( 'reset_password_button' ) ?>" />
</form>
<?php } ?>

<!-- Delete Button -->
<?php if ( !( ( user_is_administrator( $t_user_id ) && ( user_count_level( config_get_global( 'admin_site_threshold' ) ) <= 1 ) ) ) ) { ?>
Expand All @@ -224,6 +227,7 @@
<?php } ?>
</div>
<br />
<?php if( !$t_ldap ) { ?>
<div align="center">
<?php
if ( ( ON == config_get( 'send_reset_password' ) ) && ( ON == config_get( 'enable_email_notification' ) ) ) {
Expand All @@ -233,6 +237,7 @@
}
?>
</div>
<?php } ?>


<!-- PROJECT ACCESS (if permissions allow) and user is not ADMINISTRATOR -->
Expand Down Expand Up @@ -262,7 +267,7 @@
<form method="post" action="manage_user_proj_add.php">
<?php echo form_security_field( 'manage_user_proj_add' ) ?>
<input type="hidden" name="user_id" value="<?php echo $t_user['id'] ?>" />
<!-- Unassigend Project Selection -->
<!-- Unassigned Project Selection -->
<tr <?php echo helper_alternate_class() ?> valign="top">
<th class="category">
<?php echo lang_get( 'unassigned_projects_label' ) ?>
Expand Down

0 comments on commit f10c878

Please sign in to comment.