2014-11-28 01:45 EST

View Issue Details Jump to Notes ] Wiki ]
IDProjectCategoryView StatusLast Update
0012950mantisbtldappublic2011-08-05 02:45
Reportersveyret 
Assigned Todhx 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
Product Version1.2.3 
Target VersionFixed in Version 
Summary0012950: DB values are deleted when using LDAP
DescriptionWhen 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.
I will send a patch to correct this.
Tagspatch
Attached Files
  • patch file icon ldap_edit_user_1.2.patch (1,340 bytes) 2011-04-19 08:23 - 
    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
    
    
    patch file icon ldap_edit_user_1.2.patch (1,340 bytes) 2011-04-19 08:23 + 

- Relationships
duplicate of 0011351closeddhx User Real Name and E-Mail values deleted 
+ Relationships

-  Notes
User avatar

~0028678

dregad (developer)

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.
User avatar

~0028680

sveyret (reporter)

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…
User avatar

~0028681

sveyret (reporter)

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.
This issue can be set to duplicate. Sorry for disturbing !
User avatar

~0029142

dhx (reporter)

Marking as duplicated as per discussion. If this issue is not yet resolved, please advise.
+  Notes

- Issue History
Date Modified Username Field Change
2011-04-19 08:13 sveyret New Issue
2011-04-19 08:23 sveyret File Added: ldap_edit_user_1.2.patch
2011-04-19 08:23 sveyret Tag Attached: patch
2011-04-20 02:49 dregad Note Added: 0028678
2011-04-20 03:03 sveyret Note Added: 0028680
2011-04-20 03:35 sveyret Note Added: 0028681
2011-07-12 05:48 dhx Relationship added duplicate of 0011351
2011-07-12 05:48 dhx Note Added: 0029142
2011-07-12 05:48 dhx Status new => resolved
2011-07-12 05:48 dhx Resolution open => duplicate
2011-07-12 05:48 dhx Assigned To => dhx
2011-08-05 02:45 atrol Status resolved => closed
+ Issue History