mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX: Fill acting_user field instead of target_user in history
This commit is contained in:
parent
219bb0b6a7
commit
84dfaad137
|
@ -232,7 +232,7 @@ class UsersController < ApplicationController
|
|||
if current_user.staff? && current_user != user
|
||||
StaffActionLogger.new(current_user).log_update_email(user)
|
||||
else
|
||||
UserHistory.create!(action: UserHistory.actions[:update_email], target_user_id: user.id)
|
||||
UserHistory.create!(action: UserHistory.actions[:update_email], acting_user_id: user.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -264,7 +264,7 @@ class UsersController < ApplicationController
|
|||
if current_user.staff? && current_user != user
|
||||
StaffActionLogger.new(current_user).log_destroy_email(user)
|
||||
else
|
||||
UserHistory.create(action: UserHistory.actions[:destroy_email], target_user_id: user.id)
|
||||
UserHistory.create(action: UserHistory.actions[:destroy_email], acting_user_id: user.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class EmailUpdater
|
|||
if @guardian.is_staff? && @guardian.user != @user
|
||||
StaffActionLogger.new(@guardian.user).log_add_email(@user)
|
||||
else
|
||||
UserHistory.create!(action: UserHistory.actions[:add_email], target_user_id: @user.id)
|
||||
UserHistory.create!(action: UserHistory.actions[:add_email], acting_user_id: @user.id)
|
||||
end
|
||||
|
||||
if @guardian.is_staff? && !@user.staff?
|
||||
|
|
Loading…
Reference in New Issue
Block a user