mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
FIX: Prevent error when primary email is missing (#11446)
This commit is contained in:
parent
b572ca6da0
commit
538e1142e7
@ -1240,7 +1240,7 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def email
|
||||
primary_email.email
|
||||
primary_email&.email
|
||||
end
|
||||
|
||||
def email=(new_email)
|
||||
|
@ -369,7 +369,7 @@ class UserMerger
|
||||
|
||||
def log_merge
|
||||
logger = StaffActionLogger.new(@acting_user || Discourse.system_user)
|
||||
logger.log_user_merge(@target_user, @source_user.username, @source_primary_email)
|
||||
logger.log_user_merge(@target_user, @source_user.username, @source_primary_email || "")
|
||||
end
|
||||
|
||||
def update_user_id(table_name, opts = {})
|
||||
|
Loading…
Reference in New Issue
Block a user