View Issue Details

IDProjectCategoryView StatusLast Update
0010677mantisbtlocalizationpublic2010-04-23 23:22
Reportersveyret 
Assigned Todhx 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.1.8 
Target VersionFixed in Version 
Summary0010677: Signup message uses language of administrator
Description

If an admin create a new account, the message sent to the new user is in the admin language. This actually should be the default_language or at least the fallback_language.

Steps To Reproduce

As administrator, select french as preferred language.
Create a new account.
The new user recieves the message in french.

Tagspatch

Relationships

duplicate of 0007488 closedsiebrand [all lang] Creating user from an administrator account sends e-mail in admin's language instead of system-default language 

Activities

sveyret

sveyret

2009-07-03 08:17

reporter  

issue10677-1.1.x.patch (1,097 bytes)
From 7de2f79e8e7afcf66c7489b85574c993ca275385 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?St=82phane=20Veyret?= <sveyret@axway.com>
Date: Fri, 3 Jul 2009 14:12:43 +0200
Subject: [PATCH] Fix 0010677: Signup message uses language of administrator

Using default language (or fallback if default is auto)
---
 core/email_api.php |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/core/email_api.php b/core/email_api.php
index 69c21fa..7d2daa1 100644
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -375,9 +375,8 @@
 					return;
 		}
 
-#		@@@ thraxisp - removed to address #6084 - user won't have any settings yet,
-#       use same language as display for the email
-#       lang_push( user_pref_get_language( $p_user_id ) );
+		# Use default language for signup since user doesn't have settings yet
+		lang_push( config_get( 'default_language' ) );
 
 		# retrieve the username and email
 		$t_username = user_get_field( $p_user_id, 'username' );
@@ -403,7 +402,7 @@
 			}
 		}
 
-#		lang_pop(); # see above
+		lang_pop();
 	}
 
 	# --------------------
-- 
1.6.3.2

issue10677-1.1.x.patch (1,097 bytes)
sveyret

sveyret

2009-07-03 08:17

reporter  

issue10677-master.patch (1,268 bytes)
From 78df78afe6addb92d99f60062d52abc10911c6ec Mon Sep 17 00:00:00 2001
From: =?utf-8?q?St=82phane=20Veyret?= <sveyret@axway.com>
Date: Fri, 3 Jul 2009 14:15:56 +0200
Subject: [PATCH] Fix 0010677: Signup message uses language of administrator

Using default language (or fallback if default is auto)
---
 core/email_api.php |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/core/email_api.php b/core/email_api.php
index 4d9f623..c061cb6 100644
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -408,10 +408,9 @@ function email_signup( $p_user_id, $p_password, $p_confirm_hash, $p_admin_name =
 		return;
 	}
 
-	#	@@@ thraxisp - removed to address #6084 - user won't have any settings yet,
-	#  use same language as display for the email
-	#  lang_push( user_pref_get_language( $p_user_id ) );
-	# retrieve the username and email
+	# Use default language for signup since user doesn't have settings yet
+	lang_push( config_get( 'default_language' ) );
+
 	$t_username = user_get_field( $p_user_id, 'username' );
 	$t_email = user_get_email( $p_user_id );
 
@@ -438,7 +437,7 @@ function email_signup( $p_user_id, $p_password, $p_confirm_hash, $p_admin_name =
 		}
 	}
 
-	#		lang_pop(); # see above
+	lang_pop();
 }
 
 /**
-- 
1.6.3.2

issue10677-master.patch (1,268 bytes)
sveyret

sveyret

2009-07-03 08:18

reporter   ~0022361

Added patches for branches 1.1.x and master to select default language for signup.

jreese

jreese

2009-07-03 20:19

reporter   ~0022368

Reminder sent to: dhx

David, I think you fixed this. Can you please confirm?

dhx

dhx

2009-07-05 07:37

reporter   ~0022394

I havent fixed this yet, but I can take care of it :)

dhx

dhx

2009-07-05 07:41

reporter   ~0022395

Actually this is a duplicate of bug 0007488 fixed by Siebrand in http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=44719eb9f8d7043cb90c816ed8e345ca02634739

Ill review the current situation to see if Siebrands earlier patch is working correctly.

Issue History

Date Modified Username Field Change
2009-07-03 05:50 sveyret New Issue
2009-07-03 08:17 sveyret File Added: issue10677-1.1.x.patch
2009-07-03 08:17 sveyret File Added: issue10677-master.patch
2009-07-03 08:18 sveyret Note Added: 0022361
2009-07-03 13:48 vboctor Tag Attached: patch
2009-07-03 20:19 jreese Note Added: 0022368
2009-07-04 17:35 vboctor Category email => localization
2009-07-05 07:37 dhx Note Added: 0022394
2009-07-05 07:41 dhx Note Added: 0022395
2009-07-05 07:41 dhx Assigned To => dhx
2009-07-05 07:41 dhx Status new => resolved
2009-07-05 07:41 dhx Resolution open => duplicate
2009-07-05 07:41 dhx Relationship added duplicate of 0007488
2010-04-23 23:22 dhx Status resolved => closed