View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012646 | mantisbt | public | 2011-01-03 10:00 | 2011-04-05 14:23 | |
Reporter | beis | Assigned To | dhx | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.4 | ||||
Target Version | 1.2.5 | Fixed in Version | 1.2.5 | ||
Summary | 0012646: No email with LDAP | ||||
Description | I have a correct configuration of email and LDAP-Server. $g_login_method = LDAP; and I change the Access Level the user get an email about the change. | ||||
Tags | patch | ||||
Attached Files | 0001-Fix-12646-notification-email-not-sent-to-user-when-u.patch (2,133 bytes)
From 3c10a62edfe0e88b09847b3e827d5fae22b7b8ba Mon Sep 17 00:00:00 2001 From: Damien Regad <damien.regad@merckserono.net> Date: Wed, 5 Jan 2011 15:17:55 +0100 Subject: [PATCH] Fix #12646: notification email not sent to user when updating profile and LDAP=on Problem was introduced in commit 7672ca3d7f000, changing from $f_email to $t_email: one reference to $f_email was left out in the call to email_store. Changed the copyright to 2011. --- manage_user_update.php | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/manage_user_update.php b/manage_user_update.php index f6380a1..ad70b44 100644 --- a/manage_user_update.php +++ b/manage_user_update.php @@ -17,7 +17,7 @@ /** * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org - * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net + * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org */ /** @@ -50,7 +50,6 @@ $t_user = user_get_row( $f_user_id ); - $f_email = trim( $f_email ); $f_username = trim( $f_username ); $t_old_username = $t_user['username']; @@ -87,7 +86,7 @@ if ( $t_ldap && config_get( 'use_ldap_email' ) ) { $t_email = ldap_email( $f_user_id ); } else { - $t_email = email_append_domain( $f_email ); + $t_email = email_append_domain( trim( $f_email ) ); email_ensure_valid( $t_email ); email_ensure_not_disposable( $t_email ); } @@ -165,7 +164,7 @@ $t_subject = '[' . config_get( 'window_title' ) . '] ' . lang_get( 'email_user_updated_subject' ); $t_updated_msg = lang_get( 'email_user_updated_msg' ); $t_message = $t_updated_msg . "\n\n" . config_get( 'path' ) . 'account_page.php' . "\n\n" . $t_changes; - email_store( $f_email, $t_subject, $t_message ); + email_store( $t_email, $t_subject, $t_message ); log_event( LOG_EMAIL, sprintf( 'Account update notification sent to ' . $f_username . ' (' . $t_email . ')' ) ); if ( config_get( 'email_send_using_cronjob' ) == OFF ) { email_send_all(); -- 1.7.1 | ||||
You change the access level of which user, from what to what ? |
|
Every change of every user. E.g. from developer to manager or from manager to developer. |
|
The crazy thing is that: I'm activated the logging for emails. If I change the access level there is a entry in the log-file. E.g.: 2011-01-04 17:14 CET mail Account update notification sent to xxx (xxx.xxx@xxx.com) But no email will be send. |
|
OK, I can replicate your problem now. I believe it's caused by use of an incorrect variable in manage_user_update.php and should be quite simple to fix. I'll upload a patch later. |
|
The attached patch fixes the problem for me. |
|
Yes, it works. Thanks a lot. |
|
Thanks for the patch Damien! I have committed it to both branches. |
|
MantisBT: master 463f6717 2011-01-05 09:17 Damien Regad Committer: dhx Details Diff |
Fix 0012646: notification email not sent to user when updating profile and LDAP=on Problem was introduced in commit 7672ca3d7f000, changing from $f_email to $t_email: one reference to $f_email was left out in the call to email_store. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0012646 |
|
mod - manage_user_update.php | Diff File | ||
MantisBT: master-1.2.x 132fd5db 2011-01-05 09:17 Damien Regad Committer: dhx Details Diff |
Fix 0012646: notification email not sent to user when updating profile and LDAP=on Problem was introduced in commit 7672ca3d7f000, changing from $f_email to $t_email: one reference to $f_email was left out in the call to email_store. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0012646 |
|
mod - manage_user_update.php | Diff File |