FIX: Restore join to user_emails for backwards compatibility
Followup to a8310b4b
			
			
This commit is contained in:
		
							parent
							
								
									ec4cd46ea2
								
							
						
					
					
						commit
						e31454e014
					
				|  | @ -141,6 +141,10 @@ after_initialize do | |||
|         )", topics.map(&:id)) | ||||
|           .select(lookup_columns) | ||||
| 
 | ||||
|         if !defined?(UserLookup) # Remove after Discourse 2.6.0 | ||||
|           users = users.joins('join user_emails on user_emails.user_id = users.id AND user_emails.primary') | ||||
|         end | ||||
| 
 | ||||
|         map = {} | ||||
|         users.each { |u| map[u.id] = u } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue