View Issue Details

IDProjectCategoryView StatusLast Update
0005175mantisbtldappublic2009-10-07 14:19
Reporterandri Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.2 
Target Version1.2.0rc2Fixed in Version1.2.0rc2 
Summary0005175: LDAP e-mail and My Account
Description

When Mantis is configured to fetch e-mails from a LDAP directory, then when the user tries to change something on his My Account page (e.g. his real name), then Mantis displays an error saying that the e-mail isn't valid.

Additional Information

This is probably caused because Mantis expects the e-mail field to be present, although it isn't when using LDAP e-mails. As a quick hack, I threw in a one-line if() to check if we are using LDAP or not, but maybe there is a better solution.

Tagspatch

Relationships

has duplicate 0006956 closedvboctor LDAP: New User Signup 
has duplicate 0004974 closedvboctor account_page.php claims real working email is invalid when using LDAP and validate_email 

Activities

andri

andri

2005-01-27 16:20

reporter   ~0009121

The diff itself:
I'm not sure if the first check is needed.

*** mantis-0.19.2/account_update.php Tue Nov 30 15:02:58 2004
--- mymantis/account_update.php Mon Jan 17 18:38:06 2005


* 32,37 **
--- 32,38 ----
$f_password = gpc_get_string( 'password', '' );
$f_password_confirm = gpc_get_string( 'password_confirm', '' );

  • if (OFF == config_get( 'use_ldap_email' ) )
    $f_email = email_append_domain( $f_email );

    # get the user id once, so that if we decide in the future to enable this for

    * 47,53 **

    @@@ Listing what fields were updated is not standard behaviour of Mantis

    #     it also complicates the code.

! if ( $f_email != user_get_email( $t_user_id ) ) {
user_set_email( $t_user_id, $f_email );
$t_email_updated = true;
}
--- 48,54 ----

@@@ Listing what fields were updated is not standard behaviour of Mantis

    #     it also complicates the code.

! if ( $f_email != user_get_email( $t_user_id ) && OFF == config_get( 'use_ldap_email' ) ) {
user_set_email( $t_user_id, $f_email );
$t_email_updated = true;
}

dinofly

dinofly

2006-05-09 08:37

reporter   ~0012792

Thanks for the patch andri, it helped me to debug my Mantis installation.
Why isn't this patch included in the official Mantis release ?

vboctor

vboctor

2009-07-05 21:16

manager   ~0022402

As part of this fix we should fix the following 3 scenarios work:

  1. An admin creating an account.
  2. A user signing up.
  3. My Account modifications.

Related Changesets

MantisBT: master 120e423f

2009-07-06 00:43

vboctor


Details Diff
Fixes 0005175: LDAP e-mail and My Account. Affected Issues
0005175
mod - manage_user_edit_page.php Diff File
mod - core/email_api.php Diff File
mod - manage_user_create.php Diff File
mod - manage_user_create_page.php Diff File
mod - account_update.php Diff File

MantisBT: master-1.2.x 7abfd634

2009-07-06 00:43

vboctor


Details Diff
Fixes 0005175: LDAP e-mail and My Account. Affected Issues
0005175
mod - manage_user_edit_page.php Diff File
mod - core/email_api.php Diff File
mod - manage_user_create.php Diff File
mod - manage_user_create_page.php Diff File
mod - account_update.php Diff File