Skip to content

Commit

Permalink
Drop mark_as_spammer! method
Browse files Browse the repository at this point in the history
After aligning it with the `delete!` method there is no need
to keep it.
  • Loading branch information
krauselukas committed Sep 13, 2023
1 parent 258fc75 commit 8c1e864
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/api/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -658,17 +658,6 @@ def delete!(adminnote: nil)
true
end

def mark_as_spammer!
message = "User account got marked as spammer by #{User.session!}"
comments.destroy_all
self.adminnote = message
self.state = 'deleted'
save!
destroy_home_projects(reason: message)

true
end

def destroy_home_projects(reason:)
Project.where('name LIKE ?', "#{home_project_name}:%").or(Project.where(name: home_project_name)).find_each do |project|
project.commit_opts = { comment: "#{reason}" }
Expand Down

0 comments on commit 8c1e864

Please sign in to comment.