View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012950 | mantisbt | ldap | public | 2011-04-19 08:13 | 2011-08-05 02:45 |
| Reporter | sveyret | Assigned To | dhx | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | duplicate | ||
| Product Version | 1.2.3 | ||||
| Summary | 0012950: DB values are deleted when using LDAP | ||||
| Description | When using LDAP, if we update properties of a user, the values controlled by LDAP (real name and e-mail, if configured so) are cleaned from database. This is not a good idea, as database value is sometimes used directly. | ||||
| Tags | patch | ||||
| Attached Files | ldap_edit_user_1.2.patch (1,340 bytes)
From 8a75335c00c1a03e10fec51eec18e7446c180857 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=82phane=20Veyret?= <sveyret@axway.com>
Date: Tue, 19 Apr 2011 14:14:12 +0200
Subject: [PATCH] Fix 0012950: DB values are deleted when using LDAP
---
manage_user_edit_page.php | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/manage_user_edit_page.php b/manage_user_edit_page.php
index 1688adf..a5755d7 100644
--- a/manage_user_edit_page.php
+++ b/manage_user_edit_page.php
@@ -89,7 +89,11 @@
<?php
// With LDAP
if ( $t_ldap && ON == config_get( 'use_ldap_realname' ) ) {
- echo string_display_line( user_get_realname( $t_user_id ) );
+ $t_realname = user_get_realname( $f_user_id );
+ echo string_display_line( $t_realname );
+ ?>
+ <input type="hidden" name="realname" value="<?php echo string_attribute( $t_realname ) ?>" />
+ <?php
}
// Without LDAP
else {
@@ -110,7 +114,11 @@
<?php
// With LDAP
if ( $t_ldap && ON == config_get( 'use_ldap_email' ) ) {
- echo string_display_line( user_get_email( $t_user_id ) );
+ $t_email = user_get_email( $f_user_id );
+ echo string_display_line( $t_email );
+ ?>
+ <input type="hidden" name="email" value="<?php echo string_attribute( $t_email ) ?>" />
+ <?php
}
// Without LDAP
else {
--
1.7.1
| ||||
|
Hi Stéphane, This issue was already identified (see 0011351), and I provided a patch for it which was deployed as part of mantis 1.2.4. I suggest you upgrade your installation and test to confirm that it works for you. This one shouuld be resolved as duplicate. |
|
|
Hi Damien, Hi hadn't seen this other issue, sorry. But there is something I don't understand. I work on the master-1.2.x branch and I don't have your modifications. Can someone tell me if I did something wrong with git ? Thanks… |
|
|
OK, I found the « problem ». Actually, David modified the process, so this is manage_user_update.php which is modified instead of manage_user_edit_page.php. |
|
|
Marking as duplicated as per discussion. If this issue is not yet resolved, please advise. |
|