Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0011483mantisbtpreferencespublic2010-04-23 23:23
Reportertomc Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0rc2 
Summary0011483: Wrong user preferences read when sending email notifications
Description

Function user_pref_cache_array_rows is looking for user id in column "id" instead of "user_id" in table "mantis_user_pref_table".
This function is currently used only in email notifications.

TagsNo tags attached.
Attached Files
user_pref_api.patch (449 bytes)   
--- user_pref_api.php	Tue Feb 09 14:50:38 2010
+++ user_pref_api-patched.php	Tue Feb 09 14:45:42 2010
@@ -214,7 +214,7 @@
 
 	$query = "SELECT *
 				  FROM $t_user_pref_table
-				  WHERE id IN (" . implode( ',', $c_user_id_array ) . ') AND project_id=' . db_param();
+				  WHERE user_id IN (" . implode( ',', $c_user_id_array ) . ') AND project_id=' . db_param();
 
 	$result = db_query_bound( $query, Array( (int)$p_project_id ) );
 
user_pref_api.patch (449 bytes)   

Relationships

duplicate of 0010780 closedgrangeway language of emails could be wrong in specific situations 

Activities

dhx

dhx

2010-02-09 23:05

reporter   ~0024354

Thanks tomc for reporting this error. This issue has actually already been fixed in 0010780 for the 1.3.x branch but we have forgotten to backport it to 1.2.x. This has most likely been causing a number of other bugs in the 1.2.x branch (but not the 1.3.x branch developers tend to use).

I'll backport it now to 1.2.x but please see 0010780 for any further discussion on this issue.

Thanks again for your help!