Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/users/block_service.rb')
-rw-r--r--app/services/users/block_service.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/services/users/block_service.rb b/app/services/users/block_service.rb
index 37921c477b4..0715e299e87 100644
--- a/app/services/users/block_service.rb
+++ b/app/services/users/block_service.rb
@@ -20,8 +20,14 @@ module Users
private
+ # overridden by EE module
def after_block_hook(user)
- # overridden by EE module
+ custom_attribute = {
+ user_id: user.id,
+ key: UserCustomAttribute::BLOCKED_BY,
+ value: "#{current_user.username}/#{current_user.id}+#{Time.current}"
+ }
+ UserCustomAttribute.upsert_custom_attributes([custom_attribute])
end
end
end