mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: don't demote trust level 3 users who were promoted less than SiteSetting.leader_promotion_min_duration days ago
This commit is contained in:
@@ -62,6 +62,11 @@ class Promotion
|
||||
@user.transaction do
|
||||
if admin
|
||||
StaffActionLogger.new(admin).log_trust_level_change(@user, old_level, new_level)
|
||||
else
|
||||
UserHistory.create!( action: UserHistory.actions[:auto_trust_level_change],
|
||||
target_user_id: @user.id,
|
||||
previous_value: old_level,
|
||||
new_value: new_level)
|
||||
end
|
||||
@user.save!
|
||||
@user.user_profile.recook_bio
|
||||
|
Reference in New Issue
Block a user